#include<stdio.h>
#include<iostream>
#include<fstream>
#include<math.h>

using namespace std;



int main(){

	ifstream ifs;
	ofstream ofs;
	

	while (!ifs.eof()){
		int a, b, sum;
		ifs >> a >> b;

		sum = a + b;

		int res = 0;
		int p = 1;

		for (int i = 1; i <= 10; i++){
			if (i != 1) p = p * 10;
			if (sum >= p&&sum < p * 10){
				res = i;
				break;
			}
		}
		
		ofs << res << endl;
	}
	return 0;

}