#include <bits/stdc++.h>
using namespace std;
const int infi = numeric_limits<int>::max();
const double eps = 0;
const int ms = 0;
class StringRef {
 private:
  char const* begin_;
  int size_;

 public:
  int size() const { return size_; }
  char const* begin() const { return begin_; }
  char const* end() const { return begin_ + size_; }
  StringRef(char const* const begin, int const size)
      : begin_(begin), size_(size) {}
};
vector<StringRef> split3(string const& str, char delimiter = ' ') {
  vector<StringRef> result;
  enum State { inSpace, inToken };
  State state = inSpace;
  char const* pTokenBegin = 0;
  for (auto it = str.begin(); it != str.end(); ++it) {
    State const newState = (*it == delimiter ? inSpace : inToken);
    if (newState != state) {
      switch (newState) {
        case inSpace:
          result.push_back(StringRef(pTokenBegin, &*it - pTokenBegin));
          break;
        case inToken:
          pTokenBegin = &*it;
      }
    }
    state = newState;
  }
  if (state == inToken) {
    result.push_back(StringRef(pTokenBegin, &*str.end() - pTokenBegin));
  }
  return result;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string S;
  cin >> S;
  int z = 0, o = 0;
  for (__typeof(S.size()) i = 0; i < S.size(); i++) {
    if (S[i] == '0')
      z++;
    else
      o++;
  }
  cout << min(z, o) * 2 << endl;
  return 0;
}
