codeforces problem 002a