#include <iostream>
#include <string>
#include <cmath>

int count_digits(long number)
{
	int result = 1;
	while (number >= 10) {
		number /= 10;
		++result;
	}
	return result;
}

int main()
{
	long a, b;
	while (std::cin >> a >> b) {
		std::cout << count_digits(a + b) << std::endl;
	}

	return 0;
}