The IV-curve of the diodes is shown in the figure below.
The threshold voltage at which the diode opens is $U_t = 0.7$ V. Before the key K closes, the voltage on the capacitor is $U_0 = 4.5$ V.