#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  int cnt = 0;
  for (int i = 1; i < (int)s.size(); ++i) {
    string t = "";
    t += s[i - 1];
    t += s[i];
    if (t == "01" || t == "10") {
      s.erase(i - 1, 2);
      ++cnt;
      i = 1;
    }
  }
  int ans = 0;
  ans = cnt * 2;
  cout << ans << endl;
}
