#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ifstream in("input.txt");
  std::cin.rdbuf(in.rdbuf());
  string S;
  int res = 0;
  cin >> S;
  int i = 0;
  while (i < S.size() - 1) {
    if (S.substr(i, 2) == "01" || S.substr(i, 2) == "10") {
      S.erase(i, 2);
      res += 2;
      i = 0;
      continue;
    }
    i++;
  }
  cout << res << endl;
}
