data = input()
data_list = [c for c in data]
#print(data_list)
count = 0
delete_count = 0
while ('0' in data_list) and ('1' in data_list):
    #print("count" + str(count))
    if data[count] != data[count + 1]:
        data_list.pop(count)
        data_list.pop(count)
        delete_count += 2
    else:
        count += 1

  #  print(data_list)
 #   print("delete_count" + str(delete_count))
    #if delete_count >= len(data_list) // 2:
    #   break

#print(data_list)
print(delete_count)

