def counts(num):
	if num:counts(map(int, raw_input().split()))
	if num:countlist.append(len(str(num[0]+num[1])))

countlist = []
counts(map(int, raw_input().split()))
countlist.reverse()
for x in countlist:
	print x