#include <bits/stdc++.h>
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
using namespace std;
class Solve {
 public:
  void input() {}
  void solve() {
    input();
    string s;
    cin >> s;
    int _0 = 0, _1 = 1;
    for (auto e : s) {
      if (e == '0')
        _0++;
      else
        _1++;
    }
    int ans = min(_0, _1) * 2;
    cout << ans << endl;
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  Solve().solve();
  return 0;
}
