#include <iostream>
#include <string>
#include <sstream>

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

	return 0;
}