import java.util.Scanner; // program uses class Scanner

public class BPIH5E15
{
  public static long factorial(int x) 
  { 
  long faktoriyel=1; 
  for(int sayi=1;sayi<=x;sayi++) 
  { faktoriyel*=sayi;} 
  return faktoriyel; 
  }
 
  public static int read_int()
  {
         // create Scanner to obtain input from command window
        Scanner input = new Scanner( System.in );            
        int number1; // first number to add   
        System.out.print( "Enter first int: " ); // prompt
        number1 = input.nextInt(); // read first number from user
        return number1;	 
  }
    
 // main method begins execution of Java application
 public static void main( String args[] )
 {
 int x=read_int(); 
 System.out.println(x+" factorial:" + factorial(x) ); 
 } // end method main

} // end class BPIH1E4
