#include<iostream>
#include<string>
int main(void){
    int a, b;
    while(std::cin >> a >> b){
        int s = a + b;
        std::cout << std::to_string(s).length() << std::endl;
    }
    return 0;
}

