#include <iostream>
#include <stdio.h>
#include <string>

int main() {
    std::string moji;
    int a, b;
    
    while (1) {
        std::cin >> a >> b;
        moji = std::to_string(a+b);
        if (std::cin.eof()) break;
        std::cout << moji.size() << std::endl;
    }
    
    return 0;
}


