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

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