Problem - 1498F - Codeforces