#include<bits/stdc++.h>

using namespace std;

int digit(int a)
{
  int cnt = 0;
  
  while(a)
    {
      a /= 10;
      cnt++;
    }
  return cnt;
}
int main(){
  int a,b;

  while(1)
    {
      int n = 0;
      cin >> a >> b;

      n = digit(a+b);

      cout << n << endl;
    }
  return 0;
}
