#include<stdio.h>
#include<string.h>
int main()
{
    long long a,b,res,temp;
    while(scanf("%lld%lld",&a,&b)==2)
    {
        temp=0;
        res=a+b;
        while(res!=0)
        {
            long long div,mod;
            mod=res%10;
            div=res/10;
            temp+=1;
            res=div;
        }
        printf("%lld\n",temp);
    }
    return 0;
}