#include <iostream>
using namespace std;

int main() {
    
    int a[100];
    int b[100];
    int x = 0;
    int sum;
    int flag = 0;
    int count = 0;
    
    while(cin >> a[x] >> b[x]) x++;
    
    for(int i = 0; i < x; i++) {
        
        sum = a[i] + b[i];
        
        while (!flag) {
            sum = sum / 10;
            count++;
            if(sum < 1) {
                flag = 1;
                cout << count << endl;
            }
        }
        count = 0;
        flag = 0;
    }
    return 0;
}