recursion and iteration

easy one