The C18O core mass function toward Orion A: Single-dish observations