Accepted: http://codeforces.com/contest/385/submission/5921211