#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>

int main(int argc, char *argv[]){
	//std::ifstream datafile(argv[1]); //input datafile
	std::string str;
	int num1, num2; //a, b
	int sum; //a + b
	int digit = 0; //digit

	// if(datafile.fail()){
	// 	std::cout << "error : can't open this file." << std::endl;
	// 	exit(1);
	// }

	while(std::getline(std::cin, str)){
		sscanf(str.c_str(), "%d%d", &num1, &num2);

		if(num1 < 0 || num1 > 1000000 || num2 < 0 || num2 > 1000000){
			std::cout << "error : out of constraints" << std::endl;
			exit(1);
		}

		sum = num1 + num2;

		if(sum == 0){ //when sum is 0, its digit is 1
			std::cout << 1 << std::endl;
		}else{ //when sum is not 0
			while(sum != 0){
				digit++;
				sum = sum / 10;
			}
			std::cout << digit << std::endl;
			digit = 0;
		}
	}

	return 0;
}