#include<iostream>

using namespace std;

int main(){

	int  a, b,c, counter= 1, sum=1;

	while(cin >> a>>b){ 

		while(a/10!=0){
			a=a/10;
			counter++;
		}
		while(b/10!=0){
			b=b/10;
			sum++;
		}
		
		cout<<counter+sum<<endl;

		counter=1;
		sum=1;
		

	}

}