#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a = 0, n = s.length();
  cin >> s;
  for (int i = 0; i < n; i++) a += s[i] == '1';
  cout << min(a, n - a) * 2;
  return 0;
}
