#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int one = 0, zero = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s.at(i) == 0)
      one++;
    else
      zero++;
  }
  int ans;
  if (one < zero)
    ans = 2 * one;
  else
    ans = 2 * zero;
  cout << ans;
  return 0;
}
