#include <iostream>
using namespace std;

int main() {
	int a,b,c;
	while(cin>>a>>b){
		c=a+b;
			if(c<10){
				cout<<"1\n";
			}
			else if(c>9&&c<100){
				cout<<"2\n";
			}
			else if(c>99&&c<1000){
				cout<<"3\n";
			}
			else if(c>999&&c<10000){
				cout<<"4\n";
			}
			else if(c>9999&&c<100000){
				cout<<"5\n";
			}
			else if(c>99999&&c<1000000){
				cout<<"6\n";
			}
			else{
				cout<<"7\n";
			}
	}
}
