import math n = int(input()) n = math.factorial(n) print(str(n)[-12:])