#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdio>
using namespace std;
int main()
{
	int m,n;
	while(cin>>m>>n)
		cout<<ceil(log10((double)(m+n+1)))<<endl;
	getchar();
	return 0;
}