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

#define rep(p,q) for(int i = p; i < q;i++)

//2
int main(void) {
	int a, b;
	while (cin >> a >> b) {
		string sumLen = to_string(a + b);
		cout << sumLen.length() << endl;
	}
}
