# coding: utf-8

import codecs
import sys

sys.stdout = codecs.getwriter("shift_jis")(sys.stdout) # ??????
sys.stdin = codecs.getreader("shift_jis")(sys.stdin) # ??\???

# ??\??¬?????????print??????????????´?????? print(u'?????????') ??¨??????
# ??\??¬?????????input??? input(u'?????????') ??§OK
# ??°?¢???????????????????????????´??????6,7???????????????????????¢??????

"""
DEBUG = 0

if DEBUG == 0:
	a = []
	for i in range(200):
		deglist=[int(x) for x in input().split(" ")]
		a.append(deglist)
else:
	a = [[5,7],[1,99],[1000,999]]

for i in range(len(a)):
	wa = a[i][0] + a[i][1]
	print len(str(wa))
"""

while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break import codecs codecs import sys sys sys.stdout = codecs.getwriter("shift_jis")(sys.stdout) sys.stdout sys stdout codecs.getwriter("shift_jis")(sys.stdout) codecs.getwriter("shift_jis") codecs.getwriter codecs getwriter "shift_jis" sys.stdout sys stdout sys.stdin = codecs.getreader("shift_jis")(sys.stdin) sys.stdin sys stdin codecs.getreader("shift_jis")(sys.stdin) codecs.getreader("shift_jis") codecs.getreader codecs getreader "shift_jis" sys.stdin sys stdin """
DEBUG = 0

if DEBUG == 0:
	a = []
	for i in range(200):
		deglist=[int(x) for x in input().split(" ")]
		a.append(deglist)
else:
	a = [[5,7],[1,99],[1000,999]]

for i in range(len(a)):
	wa = a[i][0] + a[i][1]
	print len(str(wa))
""" while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break True try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break except EOFError:
		break break a,b = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b print len(str(a+b)) len str(a+b) str a+b a b b = map(int, raw_input().split()) map(int, raw_input().split()) b a,b = map(int, raw_input().split()) map(int, raw_input().split()) a
# coding: utf-8

import codecs
import sys

sys.stdout = codecs.getwriter("shift_jis")(sys.stdout) # ??????
sys.stdin = codecs.getreader("shift_jis")(sys.stdin) # ??\???

# ??\??¬?????????print??????????????´?????? print(u'?????????') ??¨??????
# ??\??¬?????????input??? input(u'?????????') ??§OK
# ??°?¢???????????????????????????´??????6,7???????????????????????¢??????

"""
DEBUG = 0

if DEBUG == 0:
	a = []
	for i in range(200):
		deglist=[int(x) for x in input().split(" ")]
		a.append(deglist)
else:
	a = [[5,7],[1,99],[1000,999]]

for i in range(len(a)):
	wa = a[i][0] + a[i][1]
	print len(str(wa))
"""

while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break