Can anyone help ? I can't understand this recursion function
https://mirror.codeforces.com/contest/96/problem/B
Solution : https://ideone.com/c08AT5
CF Edu Round 173 Solution Discussion