#include <iostream>
#include <cmath>
using namespace std;

int main(){
  int a, b;

  while(cin >> a >> b){
    if(a + b == 0){
      cout << 1 << endl;
    }
    else{
      cout << (int)floor(log10(a + b)) + 1 << endl;
    }
  }
}