import re
  
bit_string = raw_input()

replaced_count = 0
replaced_string = bit_string
while re.search('01|10', replaced_string):
  replaced_string, tmp_count = re.subn('01|10', '', replaced_string)
  replaced_count += tmp_count
print(replaced_count * 2)