#include <iostream>
using namespace std;

int main()
{
	int d, a, b, s;

	d = 0;
	
	
	while(d < 200){
		
		s = 0;
		cin >> a >> b;

		while(a>0){
			a /= 10;
			s++;
		}
		while(b>0){
			b /= 10;
			s++;
		}
		cout << s << endl;
		d++;

	}



	return 0;
}