#include <bits/stdc++.h>
using namespace std;
int main() {
  long long unsigned int tmp, num;
  string S;
  cin >> S;
  num = S.length();
  int flag = 0;
  int count = 0;
  while (true) {
    if (num == 0) break;
    flag = 0;
    for (int i = 0; i < num - 1; i++) {
      if (S[i] == '0' && S[i + 1] == '1') {
        S.erase(S.begin() + i, S.begin() + i + 2);
        num -= 2;
        count += 2;
        flag = 1;
        break;
      }
      if (S[i] == '1' && S[i + 1] == '0') {
        S.erase(S.begin() + i, S.begin() + i + 2);
        num -= 2;
        count += 2;
        flag = 1;
        break;
      }
    }
    if (flag == 0) break;
  }
  std::cout << count << endl;
  return 0;
}
