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; System.out.println(data); } }