#include <bits/stdc++.h>
int main() {
  std::string s;
  std::cin >> s;
  auto i = std::begin(s);
  int cnt = 0;
  while (i != std::end(s)) {
    auto d = s.find("10");
    if (d != std::string::npos) {
      s.erase(d, 2);
      cnt += 2;
    }
    d = s.find("01");
    if (d != std::string::npos) {
      s.erase(d, 2);
      cnt += 2;
    }
  }
  std::cout << cnt << std::endl;
  return 0;
}
