# -*- coding: utf-8 -*-
s = input()
n = 0
while ('01' in s or '10' in s):
  if s.find('01') != -1:
    s = s.replace('01', '', 1)
    n += 1
  elif s.find('10') != -1:
    s = s.replace('10', '', 1)
    n += 1
  else : break
print(n*2)