#include <iostream>
int digit(unsigned long long n){
	int d=1;
	while(n>9){
		n/=10;
		d++;
	}
	return d;
}
int main(){
  unsigned long long x,y;
  while(std::cin>>x>>y){
	 std::cout<<digit(x+y)<<"\n";
  }
  return 0;
}