#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;

int keta(int a)
{
	if(a/1000000 >= 1)	return 7;
	else if(a/100000 >= 1)	return 6;
	else if(a/10000 >= 1)	return 5;
	else if(a/1000 >= 1)		return 4;
	else if(a/100 >= 1)		return 3;
	else if(a/10 >= 1)		return 2;
}

int main()
{
  int a,b,sum;
  while(scanf("%d %d",&a, &b)!=EOF){
    sum = a + b;
    cout << keta(sum) << endl;
  }
}