def fact1(n) result = 1 i = 2 while ( i <= n ) do result *= i i += 1 end result end print fact1(ARGV[0].to_i), "\n"