#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
#define OLD 1
int main(){
int n;
while(scanf("%d",&n)==1){
ld d=n;
ld adjust=OLD?0:-1.77108*pow(d,1.0/6);
ld tmp=(log(2*sqrt(d)+adjust)+d*log(d)-d+log(2*M_PI*d)/2+1/(12*d))/log(10);
ld intpart,fractpart;
fractpart = modf (tmp , &intpart);
int res=(int)(pow(10,fractpart)*(OLD?10000:100));
cout<<res<<endl;
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgbG9uZyBkb3VibGUgbGQ7CiNkZWZpbmUgT0xEIDEKaW50IG1haW4oKXsKCWludCBuOwoJd2hpbGUoc2NhbmYoIiVkIiwmbik9PTEpewoJCWxkIGQ9bjsKCQlsZCBhZGp1c3Q9T0xEPzA6LTEuNzcxMDgqcG93KGQsMS4wLzYpOwoJCWxkIHRtcD0obG9nKDIqc3FydChkKSthZGp1c3QpK2QqbG9nKGQpLWQrbG9nKDIqTV9QSSpkKS8yKzEvKDEyKmQpKS9sb2coMTApOwoJCWxkIGludHBhcnQsZnJhY3RwYXJ0OwoJCWZyYWN0cGFydCA9IG1vZGYgKHRtcCAsICZpbnRwYXJ0KTsKCQlpbnQgcmVzPShpbnQpKHBvdygxMCxmcmFjdHBhcnQpKihPTEQ/MTAwMDA6MTAwKSk7CgkJY291dDw8cmVzPDxlbmRsOwoJfQp9