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

int main(){
    int a,b;
    while(cin >> a >> b){
        stringstream ss;
        ss << a + b;
        string str = ss.str();
        cout << str.length() << endl;
    }
    return 0;
}