Superconducting dot in a magnetic field