import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); long num = sc.nextLong(),data = 1; if(num >= 50) { System.out.println("000000000000"); return; } long mod = (long)100000 * 10000000; for(int i = 1;i <= num ; i++) data = (((long)data % mod) * i) % (long)mod; if(num > 14 && String.valueOf(data).length() < 12) { for(int i = String.valueOf(data).length() ; i < 12 ; i++) System.out.print("0"); } System.out.println(data); } }