#include<iostream>
#include<string>
#include<sstream>
using namespace std;


int digit( int n ){
    int d = 0;
    while( n != 0 ){
        n /= 10;
        d++;
    }
    return d;
}

int main(){
    string str;
    while (getline(cin, str)) {
        istringstream stream(str);
        int a, b;
        stream >> a >> b;
        cout << digit(a+b) << endl;
    }

    return 0;
}