s = input()
times = 0
is01 = s.find("01")
is10 = s.find("10")
while is01 != -1 or is10 != -1:
    times += 1
    if is01 != -1:
        s = s[:is01] + s[is01+2:]
    else :
        s = s[:is10] + s[is10+2:]
    is01 = s.find("01")
    is10 = s.find("10")
    print(s)
print(times*2)