codeforces round 179, task A, simpler solution