#include <iostream>
#include <string>

int main() {
	int a,b;
	while(std::cin >> a >> b){
		int sum = a+b;
		std::string str = std::to_string(sum);
		std::cout << str.length() << std::endl;
	}
	
	return 0;
}