Part of 2004 Finnish National High School Mathematics Competition
Source: Finnish Mathematics Competition 2004, Final Round, Problem 1