Codeforces Round 972 Solution Calculator