#include <iostream>
#include <array>

int main()
{
    int a;
    int b;
    int sum;
    int digit;
    for (int i = 0; i < 200; i++) {
        std::cin >> a >> b;
        if (a == 0 && b == 0) {
            break;
        } else {
            sum = a + b;
            digit = 0;
            while (sum != 0) {
                sum = sum / 10;
                digit++;
            }
            std::cout << digit << std::endl;
        }
    }
    return 0;
}