#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  map<char, int> c;
  for (int i = 0; i < s.size(); i++) c[s.at(i)]++;
  cout << min(c.at('0'), c.at('1')) * 2 << endl;
}
