There's no single math grade you "have to" have to become a dentist. Dental school admissions requirements vary by institution, but they all require a strong foundation in science, which includes math. You'll need to successfully complete college-level coursework in math, typically including at least one year of general chemistry, organic chemistry, biology, and physics. These science courses often have prerequisites that include college-level algebra and sometimes trigonometry or calculus.
In short, focus on achieving strong grades in all your science and math prerequisites in college; a specific high school grade isn't the determining factor.