#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;

  int A = count(S.begin(), S.end(), '0');
  int B = count(S.begin(), S.end(), '1');

  cout << min(A, B) * 2 << endl;
}