#include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

int main(void){
	int a,b,dig;
	double sum,test;
	std::cin >> a >> b;
	sum = (double)a+(double)b;
	test = floor(log(sum)/log(9.99999999));
	std::cout << test+1 << "\n";
	return 0;
}