Sorry folks,, admin has no time to create a story for this problem...

You have two integers n and m and you have to print value of factorial(n)%m.

OUTPUT
a single integer containing answer of problem.

Input
23 14567

NOTE You do not need to create a program for this problem you have to write your answers of given input in given code snippet
To see how to submit solution please check this link

SAMPLE INPUT
5 11

SAMPLE OUTPUT
10
'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
n,m = map(int,raw_input().split())
def fact(x):
	if x == 0:
		return 1
	elif x == 1:
		return 1
	else:
		return x*fact(x-1)

print fact(n)%m