#include <iostream>
#include <algorithm>
#include <string.h>
#include <math.h>
using namespace std;

int main(){
    int a,b;
    while((cin >> a >> b),(a|b)!=EOF){
        int cnt = 0;
        int n = a+b;
        if(n!=0)for(cnt=0;n>0;cnt++)n/=10;
        else cnt = 1;
        cout<<cnt<<endl;
    }
    return 0;
}