http://codeforces.com/problemset/problem/359/A