import java.util.Scanner; public class N500 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); long N=sc.nextLong(); long ans =1; String sans=""; if(N<50) { for(int i=2;i<=N;i++) { ans*=i; ans%=(long)Math.pow(10, 12); } sans=String.valueOf(ans); if(N>14) { if(sans.length()<12) { int b=12-sans.length(); for(int i=0;i