#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main(void){
	long long n , i , j , k ;
	while(1){
		cin >> j >> k ;
		int x = j+k;
		stringstream str;
		str << x ;
		string st = str.str();
		cout << st.size() << endl;
	}
}