#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
void ABC120C() {
  string S;
  cin >> S;
  int ans = 0;
  int i = 0;
  while (i < S.size()) {
    if (S.substr(i, 2) == "01" || S.substr(i, 2) == "10") {
      S = S.erase(i, 2);
      ans += 2;
      if (i > 1) {
        i--;
      }
      continue;
    }
    i++;
  }
  cout << ans << endl;
}
int main() {
  ABC120C();
  return 0;
}
