#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>

using namespace std;

int main (void)
{
	long long n = 0,m = 0;

	while(cin >> n >> m)
	{
		ostringstream p;
		string pp;
		p << n + m;

		pp = p.str();
		cout << pp.size() << endl;
	}
}

