int a;
  int b;
  int ans;
  while(cin >> a >> b){
    ans = a + b;
    if(ans>=0 && ans<=99){
      cout << "2" <<endl;
    }
    else if(ans>=100 && ans<=999){
      cout << "3" <<endl;
    }
    else if(ans>=1000 && ans<=1999){
      cout << "4" <<endl;
    }
  }
  return 0;
}