import sys

for line in sys.stdin:
    datas =line.split()
    if (len(datas)):
        v = int(datas[0]) + int(datas[1])
        print(len(str(v)))
    else:
        break import sys sys for line in sys.stdin:
    datas =line.split()
    if (len(datas)):
        v = int(datas[0]) + int(datas[1])
        print(len(str(v)))
    else:
        break line sys.stdin sys stdin datas =line.split() datas line.split() line.split line split if (len(datas)):
        v = int(datas[0]) + int(datas[1])
        print(len(str(v)))
    else:
        break len(datas) len datas v = int(datas[0]) + int(datas[1]) v int(datas[0]) + int(datas[1]) int(datas[0]) int datas[0] datas 0 int(datas[1]) int datas[1] datas 1 print(len(str(v))) print len(str(v)) len str(v) str v break datas =line.split() line.split() datas v = int(datas[0]) + int(datas[1]) int(datas[0]) + int(datas[1]) v
import sys

for line in sys.stdin:
    datas =line.split()
    if (len(datas)):
        v = int(datas[0]) + int(datas[1])
        print(len(str(v)))
    else:
        break