#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
    int a,b,sum,ans,a1,b1;
    for(int i=0;i<100;i++){
        cin>>a>>b;
        if(a1==a&&b1==b&&a!=0)break;
        a1=a;
        b1=b;
        sum=a+b;
        ans=0;
        if(sum==0)ans=1;
        while(sum>0){
            ans++;
            sum/=10;
        }
        cout<<ans<<endl;
    }
    return 0;
}