#include<string.h>#include<math.h>#include<stdio.h>#define LL long long#define MOD 100000000000#define base 1000000LL mul(LL a,LL b){ LL t1 = b/base; LL t2 = b%base; LL res = (a*base) % MOD; res = (t1*res) % MOD; res = (res + a*t2) % MOD; return res;}LL power(LL a,LL b){ LL res=1; a = a % MOD; while (b) { if (b&1) res = mul(res,a); a = mul(a,a); b /= 2; } return res;}int main(){ int M,N; while (scanf("%d%d",&M,&N)==2) { LL res = 0; for (int i=1;i<=M;i++) { LL ret = power(i,N); res = (ret+res) % MOD; } int ans=0; while (res%10==0) { ans++; res/=10; } printf("%dn",ans); } return 0;}


