Problem - K - Codeforces