#include <iostream>
#include <string>
#include <vector>

const unsigned int NUM = 200;

int main(){
	std::vector<int> buf;
	std::string str;

	int a,b;

	for(int index = 0; index < NUM; index++){
		std::cin >> a >> b;
		if(std::cin.eof()) break;
		str = std::to_string(a + b);
		buf.push_back(str.length());
	}

	for(auto&& sum : buf){
		std::cout << sum << std::endl;
	}
}