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

int main()
{
	int x, y;
	while (cin >> x >> y){
		int a, b;
		if (x == 0){
			a = 0;
		}else{
			a = to_string(x).size();
		}
		if (y == 0){
			b = 0;
		}
		else{
			b = to_string(y).size();
		}
		cout << a + b << "\n";
	}
	cout.flush();
}