#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long int k = 1, j = 0, ans = 0, len = s.length();
  for (int i = 0; i < s.size() - 1; i++) {
    if ((s[i] == '1' and s[i + 1] == '0') or
        (s[i] == '0' and s[i + 1] == '1')) {
      s.erase(i, 2);
      ans += 2;
      i = -1;
    }
  }
  cout << ans << endl;
  return 0;
}
