#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,m;
    while(cin>>n>>m)
    {
        int i=n+m;
        int d=0;
        while(i>0)
        {
            i/=10;
            d++;
        }
        cout<<d<<endl;
    }
    return 0;
}