#include<iostream>
using namespace std;
int digit(int ,int);

int main(){
  int a,b;
  while(cin >>a>>b && a!=EOF){
    cout <<digit(a,b)<<endl;

 }
  return 0;

}


int digit(int a,int b){
  int count=0,x;
  x=a+b;
  while(x>0){
  x/=10;
  count++;
}
  return count;}

  