package test;
public class S
{
public static long recursion ( long n )
{
if (n == 1)
{
return 1;
}
else
{
return n * recursion (n - 1);
}
}
public static void main ( String[] args )
{
long n = 1;
while (recursion (n) < 5000)
{
n++;
}
System.out.println ("n = " + n);
}
}
int n = 1;
int s = 1;
while (s <= 5000) {
n = n + 1;
s = s * n ;
}
return n;
int sum=1;
for(int i=1;i<=10;i++){
sum=sum*i;
if(sum>5000){
System.out.println(i-1);
break;
}
}