#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;
		cin >> a >> b;
		sum = a + b;


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

		else if (sum != 0){


			sum /= 10;
			++count;

		}

		cout << count << endl;
	}

return 0;

}