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

int main(){
  int a,b;
  while(cin>>a>>b){
    int ans;
    int tmp = a+b;
    string str = to_string(tmp);
    ans = str.size();
    cout << ans << endl;
  }
}
