I had a stomach pain and bought a box of stomach medicine at a pharmacy. It cost 1047 yen ($10.26 €7.64). There are several types of "over the counter medicine" in Japan. I bought a "Type-1 OTC drug". Type-1 OTC drug has the highest risk and only pharmacists can sell it. There are Type-2 and Type-3 besides Type-1. Type-3 has the lowest risk. Non-pharmacists can sell Type-2, Type-3 under the control by a pharmacist.
The following medicine is famotidine.