#condig: UTF-8
while True:
    try:
        a,b = map(int , raw_input().split())
        print len(str(a+b))
    except:
        break while True:
    try:
        a,b = map(int , raw_input().split())
        print len(str(a+b))
    except:
        break True try:
        a,b = map(int , raw_input().split())
        print len(str(a+b))
    except:
        break except:
        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
#condig: UTF-8
while True:
    try:
        a,b = map(int , raw_input().split())
        print len(str(a+b))
    except:
        break