#include<iostream>
using namespace std;
int main(){
  int a,b,i=0;
  while(cin>>a>>b,a+b!=0){
    if(i==199)
      break;
    int num=1;
    int c=a+b;
    while(c/10!=0){
      num++;
      c/=10;
    }
    cout<<num<<endl;
  }
  return 0;
}