import sys

def parse(inp):
    S=list(next(inp))
    return S
  
def main(inp):
    S = inp
    zeros=0
    ones=0
    for i in range(len(S)):
        if(S[i]=='0'): zeros+=1
        else: ones+=1
            
    return 2*min(ones,zeros)
  
print(main(parse(sys.stdin)))