//
//  main.cpp
//  AizuOnlineJudge
//
//  Created by TomoyaYamaguchi on 2016/08/05.
//  Copyright ?? 2016??´ TomoyaYamaguchi. All rights reserved.
//

#include <iostream>

using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    int a=0;
    int b=0;
    int hoge = 0;
    int count = 0;
    
    
    do{
    
        cin >> a >> b;
        
        if(a == 0 && b == 00){
            break;
        }
    
        hoge = a + b;
    
        while((hoge/=10) != 0){
            count++;
        }
    
        cout << count + 1 << endl;
        count = 0;
    }while(a!=0 && b!=0);
    
    
    return 0;
}