#include <iostream>
using namespace std;
int main() {
  int a, b, sum;
  while(cin >> a >> b) {
    int count=0;
    sum = a+b;
    for(int i=10; ; i*=10) {
      count++;
      if(sum%i==sum) break;
    }
    cout << count << endl;
  }
  return 0;
}
