#include <bits/stdc++.h>
int main() {
  std::string S;
  std::cin >> S;
  int count = 0;
  bool flg = true;
  while (flg) {
    flg = false;
    int len = S.length() - 1;
    for (int i = 0; i < len; i++) {
      if ((S[i] == '1' && S[i + 1] == '0') ||
          (S[i] == '0' && S[i + 1] == '1')) {
        flg = true;
        S.erase(S.begin() + i, S.begin() + i + 2);
        count++;
        break;
      }
    }
  }
  std::cout << count * 2;
  return 0;
}
