//by azidoazideazide(c2n14)
#include<iostream>
#include<string>
#include<cmath>
#include<algorithm> //#include<map>
#include<vector>
using namespace std;
typedef long long ll;
//#include<fstream>
//ifstream fin("rps.in");
//ofstream fout("rps.out");
//#define pb push_back
int cd(int n){
  int ans=0;
  while(n>0){
    n/=10,ans++;
  }
  return ans;
}
int main(){
	ios::sync_with_stdio(0);
	int a,b;
  while(cin>>a>>b){
      cout<<cd(a+b)<<"\n";   
  }
return 0;
}
