#include <iostream>
using namespace std;
int main(void){
    int a,b;
    while(cin>>a>>b,a){
        a+=b;
        int n=0;
        while(a>0){
            a/=10;
            n++;
        }
        cout<<n<<endl;
    }
}

