#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int a, b, i = 10;
	while (cin >> a >> b) {
		for (int j = 1;; j++) {
			if (a + b < (int)pow(10, j)) {
				cout << j << endl; 
				break;
			}
		}
	}
	return 0;
}
