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

using namespace std;

int main(){
	while(!cin.eof()){
		int a,b;
		cin>>a>>b;
		int m = a+b;
		int d = 0;
		if(m == 0){
			cout << "1" << endl;
			continue;
		}
		while(m > 0){
			m /= 10;
			d++;
		}
		cout << d << endl;
	}
	return 0;
}