We develop a theory of Coulomb oscillations in superconducting devices in the limit of small charging energy $E_C \ll \Delta$. We consider a small superconducting grain of finite capacity connected to two superconducting leads by nearly ballistic single-channel quantum point contacts. The temperature is supposed to be very low, so there are no single-particle excitations on the grain. Then the behavior of the system may be described as quantum mechanics of the superconducting phase on the island. The Josephson energy as a function of this phase has two minima which become degenerate at the phase difference on the leads equal to $\pi$, the tunneling amplitude between them being controlled by the gate voltage at the grain. We find the Josephson current and its low-frequency fluctuations and predict their periodic dependence on the induced charge $Q_x=C V_g$ with period $2e$.