#include <cstdio>
#include <cstring>
#include <cstdlib>


int main()
{
    int a,b;
    char str[32], *p;
    while(1){
        gets(str);
        if(strlen(str) == 0)return 0;
        a = atoi(strtok(str, " "));
        b = atoi(strtok(NULL, " "));
        sprintf(str,"%d",a+b);
        printf("%d\n",strlen(str));
    }
}