def f( x )
	sum = 1
	(1..x).each { |i|
		sum *= i
	}
	return sum
end

i = gets.to_i
printf( "1から%dまでの積は%dです\n" , i , f( i ) )