#include <bits/stdc++.h>
using namespace std;
vector<char> str_vec;
int solve() {
  int res = 0;
  char prev = 'a';
  for (vector<char>::iterator it = str_vec.begin(); *it != 0; it++) {
    if ((prev == '0' && *it == '1') || (prev == '1' && *it == '0')) {
      str_vec.erase(it);
      str_vec.erase(--it);
      res += 2;
    }
    prev = *it;
  }
  return res == 0 ? res : res + solve();
}
int main(int argc, char **argv) {
  char str[100000 + 1];
  scanf("%s", str);
  for (int i = 0; str[i] != 0; ++i) str_vec.push_back(str[i]);
  str_vec.push_back(0);
  printf("%d\n", solve());
}
