def solve():
  S = input()
  ans = min(S.count('0'),S.count('1'))*2
  return ans
print(solve()) def solve():
  S = input()
  ans = min(S.count('0'),S.count('1'))*2
  return ans solve S = input() S input() input ans = min(S.count('0'),S.count('1'))*2 ans min(S.count('0'),S.count('1'))*2 min(S.count('0'),S.count('1')) min S.count('0') S.count S count '0' S.count('1') S.count S count '1' 2 return ans ans print(solve()) print solve() solve def solve():
  S = input()
  ans = min(S.count('0'),S.count('1'))*2
  return ans def solve():
  S = input()
  ans = min(S.count('0'),S.count('1'))*2
  return ans solve
def solve():
  S = input()
  ans = min(S.count('0'),S.count('1'))*2
  return ans
print(solve())