#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define ten 10
using namespace std;
int main(){
  int b;
  vector<int> a(200,0),ans(200,1);
  rep(i,200){
    cin>>a[i]>>b;
    a[i]+=b;
  }
  rep(i,200){
    while(a[i]>=10){
      ans[i]++;
      a[i]/=10;
    }
  }
  rep(i,200)cout<<ans[i]<<endl;
}
    