Applying dendrogram analysis to the CARMA-NRO C$^{18}$O ($J$=1--0) data having an angular resolution of $sim$ 8, we identified 692 dense cores in the Orion Nebula Cluster (ONC) region. Using this core sample, we compare the core and initial stellar mass functions in the same area to quantify the step from cores to stars. About 22 % of the identified cores are gravitationally bound. The derived core mass function (CMF) for starless cores has a slope similar to Salpeters stellar initial mass function (IMF) for the mass range above 1 $M_odot$, consistent with previous studies. Our CMF has a peak at a subsolar mass of $sim$ 0.1 $M_odot$, which is comparable to the peak mass of the IMF derived in the same area. We also find that the current star formation rate is consistent with the picture in which stars are born only from self-gravitating starless cores. However, the cores must gain additional gas from the surroundings to reproduce the current IMF (e.g., its slope and peak mass), because the core mass cannot be accreted onto the star with a 100% efficiency. Thus, the mass accretion from the surroundings may play a crucial role in determining the final stellar masses of stars.