SRM Div1 L1 recursion.