#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
template <class T, class U>
bool cmax(T& a, U b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <class T, class U>
bool cmin(T& a, U b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  ll n = s.size();
  ll cnt = 0;
  for (ll i = 0; i < n; i++) {
    if (s[i] == '0') {
      cnt++;
    }
  }
  if (n - cnt > cnt) {
    cnt = n - cnt;
  }
  cout << cnt * 2 << endl;
}
