import java.util.Scanner; public class Main { static boolean isbig = false; public static void main(String args[]){ Scanner cin = new Scanner(System.in); long N = cin.nextLong(); long tmp = 0L; int sub=0; cin.close(); tmp = func(N); if(isbig){ sub = 12-String.valueOf(tmp).length(); } for(int i =0;in*func(n-1)){ isbig = true; } return (n*func(n-1))%(long)Math.pow(10, 12); } } }