#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

int main()
{
	int a, b;
	char buf[1024];

	while ( fgets( buf, sizeof( buf ) - 1, stdin ) != NULL )
	{
		if ( buf[0] == '\n' )
			return 0;

		sscanf( buf, "%d %d", &a, &b );
		printf("%d\n", ( int )( log10( a + b ) + 1 ) );
	}

	return 0;
}