Tell your sweet tooth to take a hike. A brisk walk zaps sugar cravings, new Austrian research finds.

The study participants either strolled or sat for 15 minutes and then rated how much they wanted to eat candy. People who had been on their feet craved sweets significantly less than the couch potatoes.

The walkers also had less of a hankering after their hike than they did before hitting the trail. 

All the study participants were overweight, but a 2009 study reported similar findings in normal-weight people.

Here’s how it works: Physical activity alleviates stress, which can encourage overeating, researchers say. Plus, the walk can distract you from whatever’s triggering your craving, like free cookies on the conference table or an overwhelming inbox, says study author Martin Kopp, Ph.D., professor of Sport & Exercise Psychology at the University of Innsbruck

So if you want to curb your need to nosh, just get on your feet, says Kopp. 

“Try visiting a colleague on the sixth floor instead of sending him or her an email,” he says.

For more ways to outsmart your sweet tooth, follow these 6 Strategies to Beat Your Sugar Habit.