
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

int dig(int n){
    int ans =0;
    while (n>0) {
        n/=10;
        ans++;
    }
    return ans;
}

int main(){
    int a,b;
    while (cin >> a and cin >>b) {
        cout << dig(a+b)<<endl;
    }
}