Exercise 1.10 - Ackermann function