#include <stdio.h>
#include <string.h>

long long int a ;
long long int b ;
char str[100] ;

int main ( )
{
	while ( scanf ( "%lld %lld" , &a , &b ) == 2 ) {
		sprintf ( str , "%lld" , a + b ) ;
		printf ( "%d\n" , strlen ( str ) ) ;
	}
	return 0 ;
}