

# 백준 #27434 (팩토리얼 3)
# 정수 N 입력
N = int(input())
result = 1
if N == 0: # N이 0인지 확인 ==> 팩토리얼 값 1임 처리
result = 1
else: # N이 아니면 1부터 N까지 모든 수를 곱하여 팩토리얼 계산
for i in range(1, N + 1): # 1부터 N까지의 숫자를 차례로 반복하는 것
result *= i # 현재 result에 i를 곱하여 팩토리얼 계산
print(result)