#include <bits/stdc++.h>
int main() {
  std::string S;
  int res = 0;
  std::cin >> S;
  while (true) {
    if (S.empty()) {
      break;
    }
    std::string::size_type pos = S.find("01");
    if (pos != std::string::npos) {
      S.erase(pos, 2);
      res += 2;
      continue;
    }
    pos = S.find("10");
    if (pos != std::string::npos) {
      S.erase(pos, 2);
      res += 2;
      continue;
    } else {
      break;
    }
  }
  std::cout << res << std::endl;
  return 0;
}
