#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 i = 0; i < 200; i++)
	{
		long long n,m;
		cin >> n >> m;

		long long u = 0;
		u = n + m;

		ostringstream str;
		str << u;
		string p = str.str();

		int q = 0;
		q = p.size();

		cout << q << endl;
	}
}
