Factorial exercise