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

int main() {
  string s;
  cin >> s;
  int a = count(s.begin(), s.end(), '0'), b = count(s.begin(), s.end(), '1');
  cout << 2 * min(a, b) << endl;
  return 0;
}