package hello1;
import java.util.Scanner;
public class jiecheng {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int factor=1;
int count=0;
for( int i=1;i<=n;i++)
{
factor=factor*i;
count++;
}
System.out.println(n+"的阶乘为"+factor+",计算了"+count+"次。");
}
}