#include<stdio.h>
int main(){
    int a,b,sum,i;
    sum=0;
    i=0;
    int tag;
    while(scanf("%d%d",&a,&b)!=EOF){
        sum=a+b;
        tag=0;
        if(sum==0) {tag=1;printf("%d",tag);break;}
        while(sum!=0){
            tag++;
            sum=sum/10;
        }
        printf("%d",tag);
    }
}