#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int num0, num1;
  num0 = count(s.begin(), s.end(), '0');
  num1 = count(s.begin(), s.end(), '1');
  cout << min(num0, num1) * 2;
  while (1)
    ;
  return 0;
}
