#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,res;

    while((scanf("%d%d",&a,&b)!=EOF)&&((a+b)>=0))
    {
        if((a+b)==0)
            printf("0\n");
        else if((a+b)<10)
            printf("1\n");

        else
            printf("%.0lf\n",ceil(log10(a+b)));
    }

    return 0;
}