Pagini recente » Cod sursa (job #2966792) | Cod sursa (job #381992) | Cod sursa (job #1274276) | Cod sursa (job #1923257) | Cod sursa (job #1011922)
#include <cstdio>
#include <cstdlib>
#define fr(i, a, b) for(int i=0; i<a; ++i)
int main()
{
long long int p, s, n = 0;
long long int ketto = 0, ot = 0;
freopen("fact.in", "r", stdin);
freopen("fact.out", "w", stdout);
scanf("%lld", &p);
while (true)
{
++n;
s = n;
while(s%5==0)
{
++ot;
if (ot==p) break;
s /= 5;
}
if (ot==p) break;
}
printf("%lld", n);
return 0;
}