#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  string s;
  cin >> s;
  int ans = 0;
  int br, rb;
  while (true) {
    br = s.find("01");
    rb = s.find("10");
    if (br != string::npos) {
      s.replace(br, 2, "");
      ans += 2;
    } else if (rb != string::npos) {
      s.replace(rb, 2, "");
      ans += 2;
    } else
      break;
  }
  cout << ans << endl;
  return 0;
}
