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

void digit()
{
    int i = 0;
    int digit[200] = {0};
    long int a, b, sum;
    while(i < 200)
    {
        cin >> a >> b;
        if((a>=0 && a <=1000000) && (b >=0 && b<=1000000))
        {
            sum = a+b;
            while(sum > 0)
            {
                sum = sum/10;
                digit[i] = digit[i]+1;
            }
            i++;
        }
        else
            exit(1);
    }
    for(int i = 0; i < 200; i++)
    {
        cout << digit[i] << endl;
    }



}


int main () {

digit();

return 0;

}