Problem - B - Codeforces