#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n, i, ans = 0;
  n = (int)(s.length());
  for (i = 0; i < n; i++) {
    if ((s.substr(i, 2) == "01") || (s.substr(i, 2) == "10")) {
      s.replace(i, 2, "");
      ans += 2;
      i = -1;
      n = (int)(s.length());
    }
  }
  cout << ans << endl;
}
