#include <algorithm>
#include <sstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <string>
#include <queue>
#include <vector>
using namespace std;

int main()
{
	int x, y, ans;
	while (cin >> x >> y && x != EOF) {
		ans = x + y;
		if (ans < 10) cout << 1 << endl;
		else if (10 <= ans && ans < 100) cout << 2 << endl;
		else if (100 <= ans && ans < 1000) cout << 3 << endl;
		else if (1000 <= ans && ans < 10000) cout << 4 << endl;
		else if (10000 <= ans && ans < 100000) cout << 5 << endl;
		else if (100000 <= ans && ans < 1000000) cout << 6 << endl;
		else cout << 7 << endl;
	}
}
