Fundamental parameters and the carbon, nitrogen and oxygen abundances are determined for 22 B-type stars with distances d 600 pc and slow rotation (v sin i 66 km s −1 ). The stars are selected according to their effective temperatures T eff and surface gravities log g, namely: T eff is between 15300 and 24100 K and log g is mostly greater than 3.75; therefore, stars with medium masses of 5-11 M ⊙ are selected. Theory predicts for the stars with such parameters that the C, N and O abundances in their atmospheres should correspond to their initial values. Non-LTE analysis of C II, N II and O II lines is implemented. The following mean C, N and O abundances are obtained: log ǫ(C) = 8.31±0.13, log ǫ(N) = 7.80±0.12 and log ǫ(O) = 8.73±0.13. These values are in very good agreement with recent data on the C, N and O abundances for nearby B stars from other authors; it is important that different techniques are applied by us and other authors. When excluding for the stars HR 1810 and HR 2938, which can be mixed, we obtain the following mean abundances for the remaining 20 stars: log ǫ(C) = 8.33±0.11, log ǫ(N) = 7.78±0.09 and log ǫ(O) = 8.72±0.12; these values are in excellent agreement with a present-day Cosmic Abundance Standard (CAS) of Nieva & Przybilla.The derived mean N and O abundances in unevolved B stars are very close to the solar photospheric abundances, as well as to the protosolar ones. However, the mean C abundance is somewhat lower than the solar one; this small but stable carbon deficiency is confirmed by other authors. One may suggest two possibilities to explain the observed C deficiency. First, current non-LTE computations of C II lines are still partially inadequate. In this case the C deficiency is invalid, so one may conclude that the Sun and the local unevolved B stars have the same metallicity. This would mean that during the Sun's life (i.e., for the past 4.5 · 10 9 yr) the metallicity of the solar neighbourhood has not markedly changed; so, an intensive enrichment of the solar neighbourhood by metals occurred before the Sun's birth. Second, the C deficiency in the local B stars is valid; it is supposed that the Sun can migrate during its life from inner parts of the Galactic disk where it has born, so its observed chemical composition can differ from the composition of young stars in its present neighbourhood.