#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int a, b;
	int da, db;
	while (cin >> a >> b) {
		da = log10(a) + 1;
		db = log10(b) + 1;
		cout << da + db << "\n";
	}
	return 0;
}