import math def main(): N = int(input()) ans = math.factorial(N) print(str(ans)[-12:]) main()