Codeforces Problem 4a Solution