// j;main(i){for(;9/i;i+=!(j%=9))printf("%dx%d=%d\n",i,j,++j*i);}

// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%.f\n",a+b?log10(a+b)+1:1.));}
// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%.f\n",a+b?floor(log10(a+b))+1:1.));}
// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%.f\n",a+b?floor(log10(a+b)+.5)+1:1.));}
// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%d\n",a+b?(int)log10(a+b)+1:1));}
// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%d\n",(int)log10(a+b)+1));}
// d;main(a,b){for(;d=~scanf("%d%d",&a,&b);puts(&d,d=(int)log10(a+b)+49));}
// d;main(a,b){for(;d=~scanf("%d%d",&a,&b);puts(&d,d=log10(a+b)+49));}
// d;main(a,b){for(;d=~scanf("%d%d",&a,&b);puts(&d))d=log10(a+b)+49;}
a;main(b){for(;~scanf("%d%d",&a,&b);puts(&a))a=log10(a+b)+49;exit(0);}

// main(){scanf("%d",&t)for(;;);printf("%d\n",d)}
// main(){scanf("%d",&t)for(;;);puts(&d)}
// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%d\n",a+b?(int)log10(a+b)+1:14347389));}////////////

// k;main(a,b){for(;k=~scanf("%d%d",&a,&b);printf("%d\n",b))for(a+=b,b=1;a/=10;b++);}
// d;main(a,b){for(;d=~scanf("%d%d",&a,&b);puts(&d))for(a+=b,d=49;a/=10;d++);}
// d;main(a,b){for(;d=~scanf("%d%d",&a,&b);puts(&d))for(a+=b,d=49;a/=10;d++);}

// #include <stdio.h>
 
// int main( void ) {
//     int a, b, d, tmp;
 
//     for ( ; scanf( "%d %d", &a, &b ) == 2; printf( "%d\n", d ) ) {
//         tmp = a + b;
//         for ( d = 1; tmp /= 10; d++ ) ;
//     }
 
//     return 0;
// }

// main(i,a,t,p,j){for(;~scanf("%d",&t)?i++<4?t<p?p=t:1:t<j?j=t:1:!printf("%d\n",p+j-50););}


//3657.383181 214.382911

// a;main(){double r,p=acos(-1);scanf("%lf",&r);a=!printf("%f %f\n",r*r*p,r*2*p);}/////////////
// double r,p=acos(-1);a;main(){scanf("%lf",&r);a=!printf("%f %f\n",r*r*p,r*2*p);}/////////////
// double r,p=acos(-1);a;main(){a=scanf("%lf",&r)/printf("%f %f\n",r*r*p,r*2*p);}/////////////
// double r,t;k;main(){scanf("%lf",&r);k=!printf("%f %f\n",t*r,2*t,t=acos(-1)*r);}
// double r,t;main(){r=scanf("%lf",&r)/printf("%f %f\n",t*r,2*t,t=acos(-1)*r);printf("%.33f",r);}
// double r,p=acos(-1);main(){r=scanf("%lf",&r)/printf("%f %f\n",t*r,2*t,t=*r);}
// double r,s;a;main(){scanf("%lf",&r);a=!printf("%f %f\n",s*r,2*s,s=acos(-1)*r);}/////////////
// double r,s;main(){scanf("%lf",&r);r=!printf("%f %f\n",s*r,2*s,s=acos(-1)*r);}/////////////
// main(){double r,s;scanf("%lf",&r);r=!printf("%f %f\n",s*r,2*s,s=acos(-1)*r);}/////////////
// double r,s;main(){scanf("%lf",&r)^!!printf("%f %f\n",s*r,2*s,s=acos(-1)*r);}/////////////
// double r,s;main(){scanf("%lf",&r)/printf("%f %f\n",s*r,2*s,s=acos(-1)*r);}/////////////

// main(){printf("%d\n",hoge());}double r,p=acos(-1);hoge(){scanf("%lf",&r);p=!printf("%f %f\n",r*r*p,r*2*p);}

// double a,b,c,d;i;main(){scanf("%lf%lf%lf%lf",&a,&b,&c,&d);i=!printf("%f\n",hypot(a-c,b-d));}
// double c[4];i;main(){for(;~scanf("%lf",c+i++););i=!printf("%f\n",hypot(*c-c[2],c[1]-c[3]));}
// double c[4],*p=c;i;main(){for(;~scanf("%lf",p++););i=!printf("%f\n",hypot(*c-c[2],c[1]-c[3]));}
// double c[],*p=c;main(){for(;~scanf("%lf",p++););p=!printf("%f\n",hypot(*c-c[2],c[1]-c[3]));}
// double a,b,c,d,*p=&d;main(){for(;~scanf("%lf",p++););p=!printf("%f\n",hypot(d-c,b-a));}


// x;main(){scanf("%d",&x);x=!printf("%d\n",x*x*x);}
// x;main(){x=scanf("%d",&x)/printf("%d\n",x*x*x);}

// a;main(b){scanf("%d%d",&a,&b);a=!printf("%f\n",a*b/3.305785);}
// a;main(b){a=scanf("%d%d",&a,&b)/printf("%f\n",a*b/3.305785);}

// f;main(a,b){scanf(f="%d %d\n",&a,&b);f=!printf(f,a*b,a+b<<1);}
// a,b;main(f){a=scanf(f="%d %d\n",&a,&b)/printf(f,a*b,a+b<<1);}


// s,n,i;main(x,y){for(;~scanf("%d,%d",&x,&y)?s+=x*y:!printf("%d\n%.f\n",s,.5+1.*n/i);i++)n+=y;}
// s,n,i;main(x,y){for(;~scanf("%d,%d",&x,&y)?s+=x*y:!printf("%d\n%.f\n",s,floor(.5+1.*n/i));i++)n+=y;}////
// s,n,i;main(x,y){for(;~scanf("%d,%d",&x,&y)?s+=x*y:!printf("%d\n%d\n",s,(int)(.5+1.*n/i));i++)n+=y;}////


// L;main(A,B,C,D){scanf("%d%d%d%d%d",&L,&A,&B,&C,&D);L=!printf("%.f\n",L-fmax(--A/C,--B/D)-1);}
// a,b,c,d,e,*p=&d;main(){for(;~scanf("%d",p++););p=!printf("%.f\n",d-fmax(--b/c,--e/a)-1);}



// char c[];p;main(t){for(;gets(c)**c;p=!puts(strncat(c,c,p%=strlen(c))+p))for(gets(&t);scanf("%d ",&t);p+=t);}

Measured memory_bytes: 628