a=int(input()) t=1 for var in reverse(a): t*=var; t=str(t) print(t[-12:])