#include<iostream>
#include<vector>

int main(void){
    std::vector<int> a,b;
    int x,y,z;
    while(std::cin>>x>>y){
      a.push_back(x);
      b.push_back(y);
    }
    for(int i=0;i<a.size();i++){
     int c=0;
     z=a[i]+b[i];
      while(z!=0){
        z = z/10;
        ++c;
      }
      std::cout<<c<<"\n";
    }
    return 0;
  }