#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	char buf[2000];
	int a,b,c;

	while(fgets(buf,sizeof(buf),stdin)!=NULL){
		c=1;
		a=atoi(strtok(buf," ")); b=atoi(strtok(NULL,"\n"));
		a+=b; while(a/=10) c++;

		cout<<c<<endl;

	}

}