import sys

def solve():
    input = sys.stdin.readline
    S = input().strip("\n")
    z, o = 0, 0
    for i in range(len(S)):
        if S[i] == "0": z += 1
        else: o += 1
        print(2 * min(z, o))
    return 0

if __name__ == "__main__":
    solve()