#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)
{
	for (int u = 0; u < 200; u++)
	{
		long long n = 0,m = 0;

		cin >> n >> m;

		ostringstream p;
		string pp;
		p << n + m;

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


