import math

def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

line = list(get_input())
for l in range(len(line)):
    a,b = [int(i) for i in line[l].split()]
    S = a + b
    keta = 0
    while S > 0:
        S = math.floor(S / 10)
        keta = keta + 1
    print(keta)

 import math math def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break get_input while True:
        try:
            yield ''.join(input())
        except EOFError:
            break True try:
            yield ''.join(input())
        except EOFError:
            break except EOFError:
            break break yield ''.join(input()) ''.join(input()) ''.join '' join input() input line = list(get_input()) line list(get_input()) list get_input() get_input for l in range(len(line)):
    a,b = [int(i) for i in line[l].split()]
    S = a + b
    keta = 0
    while S > 0:
        S = math.floor(S / 10)
        keta = keta + 1
    print(keta) l range(len(line)) range len(line) len line int(i) for i in line[l].split() for i in line[l].split() i line[l].split() [l].split [l] line l split for i in line[l].split() int(i) int i a,b = [int(i) for i in line[l].split()] a [int(i) for i in line[l].split()] b S = a + b S a + b a b keta = 0 keta 0 while S > 0:
        S = math.floor(S / 10)
        keta = keta + 1
     S > 0 S 0 S = math.floor(S / 10) S math.floor(S / 10) math.floor math floor S / 10 S 10 keta = keta + 1 keta keta + 1 keta 1 print(keta) print keta def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break get_input S = a + b a + b S keta = 0 0 keta b = [int(i) for i in line[l].split()] [int(i) for i in line[l].split()] b S = math.floor(S / 10) math.floor(S / 10) S line = list(get_input()) list(get_input()) line a,b = [int(i) for i in line[l].split()] [int(i) for i in line[l].split()] a keta = keta + 1 keta + 1 keta
import math

def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

line = list(get_input())
for l in range(len(line)):
    a,b = [int(i) for i in line[l].split()]
    S = a + b
    keta = 0
    while S > 0:
        S = math.floor(S / 10)
        keta = keta + 1
    print(keta)


