#include <iostream>
using namespace std;
 
int digit(int a)
{
    int ret = 0;
    while(a)
    {
        a/=10;ret++;
    }
    return ret;
}
 
int main()
{
    int x,y;
    while(cin >> x >> y && x != EOF)
        cout << digit(x+y) << endl;
}
