#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n_0 = 0, n_1 = 1;
  for (char c : s) {
    if (c == '0')
      n_0 += 1;
    else
      n_1 += 1;
  }
  cout << 2 * min(n_0, n_1) << endl;
}
