Codeforces 227D: Accepted