http://codeforces.com/contest/404/problem/A