#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
string s;
int main() {
  cin >> s;
  int a, b, n;
  a = b = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') a++;
    if (s[i] == '1') b++;
  }
  cout << min(a, b) * 2 << endl;
}
