#include <iostream>
using namespace std;

int digit(int x)
{
    int i = 0;
    int j = 1;
    while (j <= x) {
        j *= 10;
        i++;
    }
    return i;
}
int main()
{
    int n;
    int flag = 0;
    int m[2];
    int output[200];
    int i = 0;
    while (cin >> n) {
        if (flag == 0) {
            m[0] = n;
            flag = 1;
        } else {
            m[1] = n;
            flag = 0;
            output[i++] += digit(m[0] + m[1]);
        }
    }
    for (int j = 0; j < i; j++)
        cout << output[j] << endl;
}