#include <iostream>
using namespace std;
int main(){
    int a,b,c;
    while(1){
    cin >> a >> b;
    c = 10;
    for(int i = 1; i < 7; i++){
        if(a + b < c){
            cout << i <<endl;
            break;
        }
        else c *= 10;
    }
    }
}