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

int getDigits(int n) {
    int res = 0;
    while (n != 0) {
        res ++;
        n /= 10;
    }
    return res;
}

int main() {
    string line;
    while (getline(cin, line)) {
        stringstream ss(line);
        int a, b;
        ss >> a >> b;
        cout << getDigits(a + b) << endl;
    }
}