#include <iostream>
#include<vector>
#include<stdlib.h>
#include<algorithm>
#include<string>
using namespace std;



int main(void){

	int a, b, sum = 0, count;

	while (cin >> a >> b){//??°????????????????????°?????????
		count = 0;
		sum = a + b;


		if (sum == 0){ cout << sum << endl; }
		else if (sum != 0){
			{


				sum /= 10;
				++count;

			}

			cout << count << endl;
		}
	}

	return 0;

}