#include <iostream>
#include <cstring>
#include <cstdlib>

using namespace std;


int main(){
	int a,b;
	while (cin >>  a >>  b){
		int l = a+b;
		char n[50];
		itoa(l,n,10);
		cout << strlen(n) << endl;
	
	}
	return 0;
	}