#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<queue>
using namespace std;

int main(){

	int a, b;
	while (cin >> a >> b)
		cout << to_string(a + b).length() << endl;
	return 0;
}

