At the Olympics, there’s a fine line between regret and relief and, scientists say, it’s drawn between the second and third position on the medal podium.

Ranking by achievement, the gold medal clinches the top spot, then the silver, followed by bronze. Rank by happiness and the story changes—something that became obvious at the men’s 100 meter race in Rio on Aug. 14. At the end of the race, third-time gold medalist Usain Bolt of Jamaica embraced Canada’s Andre de Grasse, who won the bronze medal.

Bolt and de Grasse were beaming, but USA’s Justin Gatlin didn’t seem thrilled to take home the silver. Maybe it had something to do with the fact the he was booed when he entered the stadium after multiple suspensions due to doping offenses or maybe the 34-year-old was especially bitter about losing to long-standing rival Bolt. But even if those factors didn’t come into play, research suggests that Gatlin was likely to have ended up unhappier than de Grasse, as long as they finished second and third, respectively.

Back in 1995, psychologists Victoria Medvec and Thomas Gilovich of Cornell University, and Scott Madey of the University of Toledo, got undergraduate students to watch video footage of the medal ceremonies at the 1992 summer Olympics in Barcelona and rank the happiness displayed by each athlete that won a medal right when the final results were announced, and then again when they were standing on the podium. They used a 10-point ranking scale, with 1 being “agony” and 10 being “ecstasy.” The average score for silver medalists was 4.8 after the announcements, compared to the bronze medalists’ 7.1. Even though happiness seemed to taper off between the announcements and the medal stand for both medalists, the silver-winning athletes expressed more disappointment overall.

The researchers posited that third place winners were statistically better off than those who came in second because people engage counterfactual thinking to assess the events of the past. Basically, they compare their objective achievements to what “might have been,” Scientific American reported:

The most obvious counterfactual thought for the silver medalist might be to focus on almost winning gold. She would focus on the difference between coming in first place, and any other outcome. The bronze medalist, however, might focus their counterfactual thoughts downward towards fourth place. She would focus on almost not winning a medal at all. The categorical difference, between being a medalist and not winning a medal, does not exist for the comparison between first and second place.

In another study cited by Scientific American, none of the silver medalists in judo at the 2004 Athens summer Olympics smiled immediately after their matches ended—in fact, many of them displayed negative emotions such as sadness and contempt. And those who smiled on the podium looked less genuine than the gold and bronze medal winners.

At this year’s swimming events, too, American swimmer Cody Miller and British Diving duo Tom Daley and Daniel Goodfellow celebrated their bronze wins as if they’d struck gold—and to be fair, they did. A little bit less and the Olympic dream would’ve stayed a dream. But no Olympian is rooting for silver. That’s just a reminder of the gold you lost out on.

Bolt will celebrate his 30th birthday on the night of the closing ceremony, inching another year closer to the end of his incredible Olympic run. Ahead of the 2020 Tokyo Olympics, Gatlin is also likely to retire. At 21, De Grasse looks like the future of sprinting. Even Bolt thinks so.