#include <iostream>
using namespace std;
int main(){

	int a;
	int b;
	int n;

	cin>>a>>b;

	n = a+b;

	if(1<=n && n<10){

	cout << 1 << endl;
	}

	else if(10<=n && n<100){

		cout << 2 << endl;
	}
	else if(100<=n && n<1000){

		cout << 3 << endl;
	}
	else if(1000<=n && n<10000){

		cout << 4 << endl;
	}
	else if(10000<=n && n<100000){

		cout << 5 << endl;
	}
	else if(100000<=n && n<1000000){

		cout << 6 << endl;
	}
	else if(1000000<=n && n<10000000){

		cout << 7 << endl;
	}

	return 0;

}