#include <iostream>
#include <cmath>
using namespace std;

int main(){
	int out[200];
	int n, m;
	int count = 0;
	while(cin >> n >> m){
		for(int i = 0; i < 100; i++){
			if(pow(10.0,i) > n+m){
				out[count] = i;
				break;
			}
		}
		count++;
	}
	for(int i = 0; i < count; i++){
		cout << out[i] << endl;
	}
}