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

int digits(unsigned long p){
    if(p == 0) return 1;
    return (int)(log10l(p) + 1);
}

int main(){
    int a, b;
    while(cin >> a >> b){
        cout << digits(a+b) << endl;
    }
    return 0;
}