def remove_box(s,removed_box_num):
    for i in range(len(s)-1):
        if s[i] + s[i+1]==1:
            del s[i:i+2]
            removed_box_num+=2
            return remove_box(s,removed_box_num)
    return removed_box_num
 
s = [int(i) for i in input()]
 
print(remove_box(s, 0))