#include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>

using namespace std;

int main(){
	int a;
	int b;
	

	for (int i = 0; i < 200; i++){
		cin >> a >> b;
		int  c = a + b;
		if (c <= 0 && c < 10){
			cout << "1" << endl;
		}
		else if (c <= 10 && c < 100){
			cout << "2" << endl;
		}
		else if (c <= 100 && c < 1000){
			cout << "3" << endl;
		}
		else if (c <= 1000 && c < 10000){
			cout << "4" << endl;
		}
		else if (c <= 10000 && c < 100000){
			cout << "5" << endl;
		}
		else if (c <= 100000 && c < 1000000){
			cout << "6" << endl;
		}
	}
	
	return 0;
}