We develop a theory of Coulomb oscillations in superconducting devices in the limit of small charging energy EC≪Δ. We consider a small superconducting grain with finite capacitance connected to two superconducting leads by nearly ballistic single-channel quantum point contacts. The temperature is assumed to be very low, so there are no single-particle excitations on the grain. Then the behavior of the system can be described in terms of the quantum mechanics of the superconducting phase on the island. The Josephson energy as a function of this phase has two minima that become degenerate when the phase difference on the leads equals to π, the tunneling amplitude between them being controlled by the gate voltage on the grain. We find the Josephson current and its low-frequency fluctuations, and predict their periodic dependence with period 2e on the induced charge Qx=CVg.