#include <stdio.h>

int main(){
    
    int a=0, b=0, wa = 0;
    int ans;
    
    do{
        scanf("%d %d", &a, &b);
    }while( !((0<=a && a<=1000000) && (0<=b && b<=1000000)) );
    wa = a + b;
    
    while( wa != 0 ){
        wa /= 10;
        ans++;
    }
    
    printf("%d\n", ans);
    
    return 0;
}