#include<iostream>
using namespace std;

int main() {

    int a, b;

    while (cin >> a >> b) {
        int n = 1;
        for(int i = 0; ; i++) {
            if (a + b < n)  {
                cout << i << endl;
                break;
            }
            n = n * 10;
        }
    }
     
    return 0;

}