#include <iostream>

int main(int argc, char **argv) {
	int a, b, sum, digit;
	
	while(std::cin) {
		a = 0;
		b = 0;
		std::cin >> a >> b;
		sum = a + b;
		
		digit = 0;
		if(a * b > 0) {
			while(sum != 0) {
				sum /= 10;
				digit += 1;
			}
			std::cout << digit << std::endl;
		}
	}
}
