#include <iostream>
using namespace std;
int main(){
  int a,b,k;
  while(cin >> a >> b){
    if(a <= 1000000 && b <= 1000000 && 0 <= a && 0<= b){
      a = a + b;
      for(int j=10000000,k=8;j>=1;j/=10,k--){
	if((b = a/j)>0){
	  cout << k << endl;
	  break;
	}
      }
    }
  }
  return 0;
}