#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

#define FOR(i,b,n) for(int i=b;i<n;i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1<<25

using namespace std;

int a, b;

int main()
{

	while( cin >> a >> b, !cin.eof() )
	{
		int c = a+b;
		char str[100];
		sprintf( str, "%d", c );

		string s;
		s += str;

		cout << s.size() << endl;
	}

	return 0;

}