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

int main(){
  vector<int> sum;
  vector<string> truss;
  int a,b;
  while(cin >> a >> b) {
 sum.push_back(a+b);
  }
  for(int i=0;i<(int)sum.size();i++) { 
    truss.push_back(to_string(sum[i]));
  cout<<truss[i].size()<<endl;
  }
  return 0;
}

