#include <iostream>

typedef struct _Data {
    int leftVal;
    int rightVal;
} Data;

typedef struct _DataList {
    int effectCount;
    Data dataList[200];
    int digitNumber[200];
} DataList;

class DigitNumber {
public:
    DigitNumber();
    // DigitNumber(const DigitNumber& other);
    // ~DigitNumber();

    bool Run();

private:
    bool ReadLine();
    bool Calc();
    void Show() const;

private:
    DataList m_DataList;
};

DigitNumber::DigitNumber()
{
    m_DataList = { 0 };
}

bool DigitNumber::Run()
{
    // Ignore return value
    (void)ReadLine();
    (void)Calc();
    Show();

    return true;
}

bool DigitNumber::ReadLine()
{
    int l = 0, r = 0;
    while (std::cin >> l >> r) {
        m_DataList.dataList[m_DataList.effectCount].leftVal = l;
        m_DataList.dataList[m_DataList.effectCount].rightVal = r;
        ++m_DataList.effectCount;
    }

    return true;
}

bool DigitNumber::Calc()
{
    unsigned int digitNumber = 0;
    unsigned int num = 0;

    for (int i = 0; i < m_DataList.effectCount; ++i) {
        digitNumber = 0;
        num = m_DataList.dataList[i].leftVal + m_DataList.dataList[i].rightVal;
        while (num != 0) {
            num /= 10;
            ++digitNumber;
        }
        m_DataList.digitNumber[i] = digitNumber;
    }
    return true;
}

void DigitNumber::Show() const
{
    for (int i = 0; i < m_DataList.effectCount; ++i) {
        std::cout << m_DataList.digitNumber[i] << std::endl;
    }
}

int main()
{
    DigitNumber digitNumber;
    digitNumber.Run();
}