With Halloween comes ghosts, goblins and goodies—and the sugar in those treats can play some unwanted tricks on your teeth if you’re not careful.

Here’s why: The bacteria in your mouth are probably more excited to eat Halloween candy than you are. When the bacteria eat the sugar and leftover food in your mouth, a weak acid is produced. That acid is what can contribute to cavities.

But don’t hang up your costume just yet. “Halloween is about candy, dressing up and having fun,” Dr. Friscia says. “It’s OK to eat that candy on Halloween as a splurge as long as you’re brushing twice a day and flossing once a day all year long.”

To help you sort through the trick-or-treat bag loot, we have a rundown of some common candies and their impact on your teeth:

Chocolate

Chocolate is probably your best bet, which is good because it’s also one of the most popular kinds of candy handed out on Halloween. “Chocolate is one of the better candies because it washes off your teeth easier than other types of candy,” Dr. Friscia says. “Dark chocolate also has less sugar than milk chocolate.”

Sticky and Gummy Candies

Be picky if it’s sticky. These are some of the worst candies for your teeth. “This candy is harder to remove and may stay longer on your teeth, which gives that cavity-causing bacteria more time to work,” Dr. Friscia says.

Hard Candy

Hard candies are also ones to watch on Halloween. “They can actually break your teeth if you’re not careful,” Dr. Friscia says. “You also tend to keep these kinds of candies in your mouth for longer periods of time so the sugar is getting in your saliva and washing over your teeth.”

Sour Candy

You might want to pass on things that make you pucker – especially if they are sticky and coated in sugar. “Sour candy can be very acidic,” says Dr. Friscia. “And that acidity can weaken and damage the hard outer shell of your teeth, making your teeth more vulnerable to cavities.”

Popcorn Balls

Have some floss handy if you’re enjoying one of these fall favorites. “Kernels can get stuck in-between your teeth,” Dr. Friscia says. “They are also sticky, sugary and can be hard.”