#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
	int a, b,c,d;
	d = 0;
	while(cin >> a >> b){
		
		c = a + b;
		while (1) { if (c == 0) {cout << d << endl;
		d = 0; break;
		}
		else { d++; c = c / 10; }
		}
		
	}
	return 0;
}
