#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1000000007;
const double PI = acos(-1);
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
void solve() {
  string s;
  cin >> s;
  int n = s.size();
  int c0, c1;
  for (int i = 0; i < (n); ++i) {
    if (s[i] == '0')
      c0++;
    else
      c1++;
  }
  cout << 2 * min(c0, c1) << endl;
}
int main() {
  solve();
  return 0;
}
