Add factorial function.
Solve 34.