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

int keta(int a) {
  if ( a == 0 ) {
    return 1;
  }
  int rec = 0;
  while ( a != 10 ) {
    a /= 10;
    rec++;
  }
  return rec;
}

main()
{
  int a, b;

  while( scanf("%d %d", &a, &b) != EOF ) {
    a += b;
    cout << keta(a) << endl;
  }
  
  return (0);
}

