#include<iostream>
using namespace std;

int main(void){
	while(true){
		long int a, b, d=0, s; //d:digit s:sum
		cin >> a >> b;
		s = a + b;
		while(s>=1){
			s = s/10;
			d++;
		}
		cout << d << endl;
		if(cin.eof()) break;
	}
	return 0;
}