#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int a,b,count;
    while(scanf("%d %d",&a,&b)!=EOF)
    {
        count=0;
        if(a>0)
            for(;a>0;a=a/10)
                count++;
        else
            count ++;

        if( b>0)
        for(;b>0;b=b/10)
            count++;
            else
                count++;
        printf("%d\n",count);
    }
    return 0;
}