result = []
while nil != buf = gets
	arr = []
	arr = buf.split(" ").collect do |s| s.to_i end
	result.push arr
end

i=0


for i in (0..result.length-1)
	result[i]=result[i][0]+result[i][1]
end

j=0

for j in (0..result.length-1)
	print result[j].to_s.length, "\n"
end