#include<iostream>

using namespace std;

int main(){

  while(1){
    int a,b;
    cin >> a >> b;
    int count = 0;
    int result = a + b;
    while(1){
      if(result == 0){
        cout << count << "\n";
        break;
      }
      result /= 10;
      count++;
    }
  }
  return 0;
}