codeforces problem 277A