Magnetooscillations in a superconductor