#include<iostream>
#include<cstdio>
#include<string>
int main(){
    int a, b;
    while(cin >> a >> b){
        //cin >> b;
        string s = to_string(a+b);
        printf("%d\n", s.length());
    }
}
