#include <iostream>
using namespace std;

int main()
{
	int value,value_2,count = 0;
	
	while(cin >> value >> value_2)
	{
		count += 2;
		while(value / 10 != 0)
		{
			value /= 10;
			count++;
		}
		while(value_2 / 10 != 0)
		{
			value_2 /= 10;
			count++;
		}

		cout << count << endl;
		count == 0;
	}
	return 0;
}