#include #include #define REP(i,a,b) for(i=a;i 0) { if(n&1) res = res * x; x = x * x; n >>= 1; } return res; } int main() { int i,j,k; int n; int a,cnt5=0,cnt2=0; cin >> n; for(i=0;i> a; int tmp5=2,tmp2=2; while(a % 5 == 0) { tmp5--; a /= 5; } while(a % 2 == 0) { tmp2--; a /= 2; } if(cnt5 < tmp5) cnt5 = tmp5; if(cnt2 < tmp2) cnt2 = tmp2; } int rep = 1; for(i=0;i