#include<cstdio>
#include<algorithm>
#include<cmath>

using namespace std;

int main(){
        double a, b;
        int i, c;
        scanf("%lf%lf", &a, &b);
        c = 1;
        for(i = 0; c >= 0; i++){
                c = (a + b) - pow(10, i);
        }
        printf("%d\n", i - 1);
        return 0;
}
 
               