Factorial with counting up