#include<iostream>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define eps 1e-6
#define INF (1<<20)
#define PI acos(-1.0)
#define MAX 100005
#ifdef LOCAL
//#include<windows.h>
#endif // LOCAL
using namespace std;
int f(int a,int b)
{
    int t=a+b;
    int r=0;
    while(t)
    {
        t/=10;
        r++;
    }
    return r;
}
int main(int argc,char argv[])
{
    #ifdef LOCAL
    freopen("in.txt","r",stdin);
    //freopen("out.bat","w",stdout);
    #endif // LOCAL
    int a,b;
    while(scanf("%d%d",&a,&b)!=EOF)
    {
        printf("%d\n",f(a,b));
    }
    return 0;
}