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

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