JBMO 2024  | Problem 1 - Official Solution