#include<bits/stdc++.h>
using namespace std;
const int MOD=100000007;
int main()
{
string s;
cin>>s;
long long fac=0;
for(auto c:s)
{
fac=((fac*10)+(c-'0'))%MOD;
}
long long res=1;
for(long long i=1; i<=MOD; i++)
{
res=res*i;
res=res%MOD;
if(res==fac)
{
cout<<i<<endl;
break;
}
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKY29uc3QgaW50IE1PRD0xMDAwMDAwMDc7CmludCBtYWluKCkKewogICAgc3RyaW5nIHM7CiAgICBjaW4+PnM7CiAgICBsb25nIGxvbmcgZmFjPTA7CiAgICBmb3IoYXV0byBjOnMpCiAgICB7CiAgICAgICAgZmFjPSgoZmFjKjEwKSsoYy0nMCcpKSVNT0Q7CiAgICB9CiAgICBsb25nIGxvbmcgcmVzPTE7CiAgICBmb3IobG9uZyBsb25nIGk9MTsgaTw9TU9EOyBpKyspCiAgICB7CiAgICAgICAgcmVzPXJlcyppOwogICAgICAgIHJlcz1yZXMlTU9EOwogICAgICAgIGlmKHJlcz09ZmFjKQogICAgICAgIHsKICAgICAgICAgICAgY291dDw8aTw8ZW5kbDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQoKfQo=
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, or enum expected
#include<bits/stdc++.h>
^
Main.java:3: error: class, interface, or enum expected
const int MOD=100000007;
^
Main.java:4: error: class, interface, or enum expected
int main()
^
Main.java:7: error: class, interface, or enum expected
cin>>s;
^
Main.java:8: error: class, interface, or enum expected
long long fac=0;
^
Main.java:9: error: class, interface, or enum expected
for(auto c:s)
^
Main.java:12: error: class, interface, or enum expected
}
^
Main.java:14: error: class, interface, or enum expected
for(long long i=1; i<=MOD; i++)
^
Main.java:14: error: class, interface, or enum expected
for(long long i=1; i<=MOD; i++)
^
Main.java:14: error: class, interface, or enum expected
for(long long i=1; i<=MOD; i++)
^
Main.java:17: error: class, interface, or enum expected
res=res%MOD;
^
Main.java:18: error: class, interface, or enum expected
if(res==fac)
^
Main.java:21: error: class, interface, or enum expected
break;
^
Main.java:22: error: class, interface, or enum expected
}
^
15 errors