Codeforces 381D: Accepted