#include <iostream>
using namespace std;
int main(void){
  long a, b, sum, count;
  
  while(true) {
    cin >> a >> b;
    
    count = 0;
    sum = a + b;
    if (sum == 0) {
      count++;
    } else {
      while(sum != 0) {
        sum /= 10;
        count++;
      }
    }
    cout << count << endl;
    
    if ( cin.eof() ) { break; }
  }
}