#include<stdio.h>

using namespace std;

int addf(int a,int b)
{
    int c;
    c=a+b;
    return c;
}

int digitcountf(int n)
{   int x,count= 0;

    while(n>0)
    {
    x=n%10;
    count++;
    n=n/10;
    }
    return count;
 }

int main ()
{
    long long int n,m,a,d;
    while (scanf("%lld %lld",&n,&m)==2)
    {
        a = addf(n,m);
        d = digitcountf(a);
        printf("%lld\n",d);

    }




return 0;
}