#include <bits/stdc++.h>
int main() {
  std::string in;
  std::cin >> in;
  int cnt = 0;
  while (1) {
    int pos1 = in.find("10");
    int pos2 = in.find("01");
    if (pos1 == std::string::npos && pos2 == std::string::npos) {
      break;
    }
    if (pos1 != std::string::npos) {
      in.erase(pos1, 2);
    } else {
      in.erase(pos2, 2);
    }
    cnt++;
  }
  std::cout << cnt * 2 << std::endl;
  return 0;
}
