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

int main() {
	// your code goes here
	int a,b;
	while(cin >> a >> b){
		char s[100];
		sprintf(s,"%d",a+b);
		cout << strlen(s) << endl;
	}
	return 0;
}
