#include <iostream>
using namespace std;

int Number_of_digits(int n)
{
	int digits = 1;

	while (1) {
		n /= 10;
		if(n)
			++digits;
		else break;
	}

	return digits;
}

int main(int argc, char **argv)
{
	int a, b;
	while (cin >> a >> b) {

		cout << Number_of_digits(a + b) << endl;

	}

	return 0;
}