#include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

int DigitCount(int x) {
	int count = 0;
	while (x) {
		x /= 10;
		count++;
	}
	return count;
}

signed main() {
	int a, b;
	while (cin >> a >> b) {
		cout << DigitCount(a + b) << endl;
	}
	return 0;
}
