  Motivated by recent experiment, we consider charging of a nanowire which is
proximitized by a superconductor and connected to a normal-state lead by a
single-channel junction. The charge $Q$ of the nanowire is controlled by gate
voltage $e{\cal N}_g/C$. A finite conductance of the contact allows for quantum
charge fluctuations, making the function $Q(\mathcal{N}_g)$ continuous. It
depends on the relation between the superconducting gap $\Delta$ and the
effective charging energy $E^*_C$. The latter is determined by the junction
conductance, in addition to the geometrical capacitance of the proximitized
nanowire. We investigate $Q(\mathcal{N}_g)$ at zero magnetic field $B$, and at
fields exceeding the critical value $B_c$ corresponding to the topological
phase transition. Unlike the case of $\Delta = 0$, the function
$Q(\mathcal{N}_g)$ is analytic even in the limit of negligible level spacing in
the nanowire. At $B=0$ and $\Delta>E^*_C$, the maxima of $dQ/d\mathcal{N}_g$
are smeared by $2e$-fluctuations described by a single-channel "charge Kondo"
physics, while the $B=0$, $\Delta<E^*_C$ case is described by a crossover
between the Kondo and mixed-valence regimes of the Anderson impurity model. In
the topological phase, $Q(\mathcal{N}_g)$ is analytic function of the gate
voltage with $e$-periodic steps. In the weak tunneling limit,
$dQ/d\mathcal{N}_g$ has peaks corresponding to Breit-Wigner resonances, whereas
in the strong tunneling limit (i.e., small reflection amplitude $r$ ) these
resonances are broadened, and $dQ/d\mathcal{N}_g-e \propto r\cos(2\pi
\mathcal{N}_g)$.
