Calculating how many tablets are needed for a prescription