#include<iostream>
#include<stdlib.h>

using namespace std;

void get_digit(int a,int b){
  int sum = a+b;
  int digit=0;

  while(sum != 0){
    sum /= 10;
    digit++;
  }

  cout <<digit << "\n";
}

int main(){
  int i=0;
  int input=-1;
  int a=-1,b=-1;

  while(cin >> input ){
    i++;
    if(i == 1){
      a = input;
    }else if(i == 2){
      b = input;
      i=0;
    }
    if(i == 0){
      get_digit(a,b);
      a = -1;
      b= -1;
    }
  }

  return 0;
}

