while a = gets.to_i
	Signal.trap(:INT){
 	 exit(0)
	}

	siz = 1 #keta
	b = gets.to_i

	break if (a == nil||b == nil)
	sum = a + b

	for i in (1..7)
		 if siz > sum
	 		puts i-1
	 		break
	 	end
	 	siz *= 10
	end

end