#include<iostream>

using namespace std;
 
int main(){
  int x[3],y[3],sum,i;
  int digit[3] = {0};

  for(i=0; i<3; ++i)
    cin >> x[i] >> y[i];

  for(i=0; i<3; ++i){
    sum = x[i] + y[i];

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

  for(i=0; i<3; ++i)
    cout << digit[i] << "\n";

    return 0;
}