import sys
for l in sys.stdin:
    n, m = map(int, l.split())
    print(len(str(n+m))) import sys sys for l in sys.stdin:
    n, m = map(int, l.split())
    print(len(str(n+m))) l sys.stdin sys stdin n, m = map(int, l.split()) n map(int, l.split()) map int l.split() l.split l split m print(len(str(n+m))) print len(str(n+m)) len str(n+m) str n+m n m m = map(int, l.split()) map(int, l.split()) m n, m = map(int, l.split()) map(int, l.split()) n
import sys
for l in sys.stdin:
    n, m = map(int, l.split())
    print(len(str(n+m)))