import java.io.*;
class Factorial{
public static void main(String[] args) throws IOException{
DataInputStream in=new DataInputStream(System.in);
System.out.println("\nENTER NUMBER : ");
int num = Integer.parseInt(in.readLine());
System.out.print(num+"! = ");
if(num == 0){System.out.print("1 \n");}
else if(num == 1){System.out.print("1 \n");}
else{
int fact= 1;
for (int i=1; i<=num; i++)
{
fact=fact*i;
}
System.out.print(fact+"\n");
}
}
}
class Factorial{
public static void main(String[] args) throws IOException{
DataInputStream in=new DataInputStream(System.in);
System.out.println("\nENTER NUMBER : ");
int num = Integer.parseInt(in.readLine());
System.out.print(num+"! = ");
if(num == 0){System.out.print("1 \n");}
else if(num == 1){System.out.print("1 \n");}
else{
int fact= 1;
for (int i=1; i<=num; i++)
{
fact=fact*i;
}
System.out.print(fact+"\n");
}
}
}