Hungary ranks fourth (above neighbour Romania, and after China, the United States and Russia) in the all-time medal count at the International Mathematical Olympiad with 336 total medals, dating back to 1959.