#include<stdio.h>
#define MAX 1000000

int kcount(int,int);
int a[MAX],b[MAX],c[MAX];

int main(){
    int i,count=0,keta;
    
    i=1;
    while(scanf("%d %d",&a[i],&b[i]) != EOF){
        i++;
        count++;
    }
    
    for(i=1; i<=count; i++){
        c[i] = a[i] + b[i];
    }
    
    for(i=1; i<=count; i++){
    keta=kcount(c[i],0);
    if(keta == 0) c[i] = 1;
    else c[i] = keta;
    }
       
    for(i=1;  i<= count; i++){
    printf("%d\n",c[i]);
    }
    
    return 0;
}


int kcount(int c,int count){
    
    if(c==0) return count;
    else {
        c/=10;
        count++;    
        kcount(c,count);
    }
}