#include <bits/stdc++.h>
int main() {
  std::string s;
  std::cin >> s;
  int prevcnt = -1;
  int cnt = 0;
  while (s.size() > 1) {
    for (int i = 0; i < s.size() - 1; i++) {
      if (s.at(i) == '0' && s.at(i + 1) == '1') {
        s.erase(s.begin() + i + 1);
        s.erase(s.begin() + i);
        cnt++;
        break;
      } else if (s.at(i) == '1' && s.at(i + 1) == '0') {
        s.erase(s.begin() + i + 1);
        s.erase(s.begin() + i);
        cnt++;
        break;
      }
    }
    if (prevcnt == cnt) break;
    prevcnt = cnt;
  }
  std::cout << cnt * 2;
  return 0;
}
