#include<iostream>
using namespace std;

int main(){
	int a, b;
	while(cin >> a >> b){
		if(a+b == 0)
			cout << 1 << endl;
		else {
			int num = 0;
			for(int i = a+b; i > 0; i /= 10){
				num++;
			}
			cout << num << endl;
		}
	}
    return 0;
}
