for var in range(1,2001):
    try:
        a,b=map(int,input().split())
        c=a+b
        c=str(c)
        print(len(c))
    except:
        break for var in range(1,2001):
    try:
        a,b=map(int,input().split())
        c=a+b
        c=str(c)
        print(len(c))
    except:
        break var range(1,2001) range 1 2001 try:
        a,b=map(int,input().split())
        c=a+b
        c=str(c)
        print(len(c))
    except:
        break except:
        break break a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b c=a+b c a+b a b c=str(c) c str(c) str c print(len(c)) print len(c) len c a,b=map(int,input().split()) map(int,input().split()) a b=map(int,input().split()) map(int,input().split()) b c=str(c) str(c) c c=a+b a+b c
for var in range(1,2001):
    try:
        a,b=map(int,input().split())
        c=a+b
        c=str(c)
        print(len(c))
    except:
        break