You will never pay more for a prescription than over the counter medication when you consider how much of it you get. If it's cheaper over the counter, then you're getting less of it, either fewer pills or less active ingredient per pill.
This is also why, for example, you get two inhalers...