#encoding:utf-8
def fact(n)
 if n != 1
  return n*fact(n-1)
 else
  return 1
 end
end

numbers = []
while true
 integer = gets.chomp
 if integer == ""
  break
 end
 numbers.push integer.to_i
end

i = 0
while i < numbers.length
 puts fact(numbers[i])
 i += 1
end