#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <vector>
#include <stack>
#include <map>
#include <queue>
#include <string.h>
#include <algorithm>
#include <iostream>
#define ll long long
#define db double
#define INFINITE 9999999

using namespace std;

int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    int a,b;
    char s[50];
    while(cin>>a>>b){
        sprintf(s,"%d",a+b);
        cout<<strlen(s)<<endl;
    }
    return 0;
}