GANGNEUNG, South Korea (Reuters) - Russian athletes walked away from the Pyeongchang Games with a medal count equivalent to that of Vancouver 2010 but fell short of their main goal: leave the Olympics with their flag.

Feb 25, 2018; PyeongChang, South Korea; Olympic Athletes from Russia march into the stadium during the closing ceremony for the Pyeongchang 2018 Olympic Winter Games at Pyeongchang Olympic Stadium. Mandatory Credit: Michael Madrid-USA TODAY Sports

Pyeongchang has been an Olympics of caveats for Russian athletes, who were competing as neutrals as punishment for allegations the country systematically manipulated doping tests at the 2014 Sochi Games.

At Pyeongchang, they were not allowed to brandish their flag, wear their national colors or be serenaded by the country’s anthem if they won gold.

The Russian delegation had said it was not aiming to top the medals table, but rather to retrieve the country’s flag and Olympic status at the closing ceremony by following a code of conduct outlined by the International Olympic Committee (IOC).

But two doping cases, involving a medal-winning curler Alexander Krushelnitsky and bobsledder Nadezhda Sergeeva, prompted the IOC on Sunday to leave Russia’s Olympic suspension in place.

Although Russian authorities said the country’s Olympic team had been decimated by the IOC decision not to invite some top competitors, Russians in Pyeongchang faired similarly to their compatriots who competed in Vancouver.

At Pyeongchang, Russian athletes won two gold, six silver and nine bronze medals, finishing 13th in the medals table.

At Vancouver, they had three gold, five silver and seven bronze. Those Games had fewer events and did not have a team figure skating event, in which the Olympic Athletes from Russia won silver in Pyeongchang.

Ahead of the Games, data compiled by Reuters found that the Russian team in Vancouver was essentially as strong, at least on paper, as the one in Pyeongchang.

“With a team full of youngsters and the conditions in which we were in, I can say that the athletes and their coaches did the maximum they could at this time,” said Alexander Gorshkov, the president of the Russian figure skating federation. “Sometimes it worked out and other times it didn’t.”

Russian athletes dazzled in figure skating, with 15-year-old Alina Zagitova winning gold with a stellar performance. Her training partner, two-time world champion Evgenia Medvedeva, finished a close second. The two also won silver in the team event.

Athletes from Russia also proved strong in cross-country skiing, winning silver in three events and bronze in five others.

Some returning Olympians disappointed. Snowboarder Vic Wild, who won two gold medals in Sochi, and Sochi bronze medalist Alena Zavarzina both finished off the podium in Pyeongchang.

Russia’s moment of redemption came on Sunday when the men’s hockey team began singing the country’s national anthem over the Olympic one after a 4-3 overtime win against unexpected finalists Germany.

The absence of players from the National Hockey League (NHL), the world’s strongest league, also seemed to take some of the luster off the Russian team’s victory.

But for the Russian men’s hockey team, which last won an Olympic title as the Unified Team in 1992, gold is gold.

“The medal is the same with or without the NHL,” defenseman Vyacheslav Voynov told reporters. “The tournament was a little different. But the emotions and the joy are the same.”