#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int main(){
	while(!cin.eof()){
		int a,b;
		cin>>a>>b;
		int m = a+b;
		if(m == 0)
			cout << "1" << endl;
		else { 
			int ans = (int)log10((double)m * 10);
			cout << ans << endl;
		}
	}
	return 0;
}