#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main(){
	int a,b,c;
	string str;
	stringstream ss;
	while(cin>>a>>b){
		c=a+b;
		ss<<c;
		str=ss.str();
		ss.str("");
		c=str.length();
		cout<<c<<endl;
	}
	return 0;
}