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

int main(){
        while(1){
                int a, b;
                scanf("%d %d", &a, &b);
                double temp =log10(a + b);
                cout << floor(temp) << endl;
        }
        return 0;
}