#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt = 0, pos;
  bool flag = true;
  string s;
  cin >> s;
  while (flag) {
    flag = false;
    pos = s.find("01");
    if (pos != std::string::npos) {
      s.erase(s.begin() + pos, s.begin() + pos + 2);
      cnt += 2;
      flag = true;
    } else {
      pos = s.find("10");
      if (pos != std::string::npos) {
        s.erase(s.begin() + pos, s.begin() + pos + 2);
        cnt += 2;
        flag = true;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}
