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

#define MAX 256

int main(void){

	int a, b, c[MAX], t = 0;
	int i = 0, s;

	while (t == 0){
		c[i] = 0;
		scanf("%d%d", &a, &b);
		s = a + b;
		while (s >= 10){
			c[i]++;
			s = s / 10;
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%d", c[j]);
	}

	return 0;
}