We study the superconductivity in small grains in the regime when the quantum level spacing $\delta\varepsilon$ is comparable to the gap $\Delta$. As $\delta\varepsilon$ is increased, the system crosses over from superconducting to normal state. This crossover is studied by calculating the dependence of the ground state energy of a grain on the parity of the number of electrons. The states with odd numbers of particles carry an additional energy $\Delta_P$, which shows non-monotonic dependence on $\delta\varepsilon$. Our predictions can be tested experimentally by studying the parity-induced alternation of Coulomb blockade peak spacings in grains of different sizes.