See [Codeforces #816B](http://codeforces.com/contest/816/problem/B)
See Codeforces #816B