#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int left = S.size() - 2;
  int cnt = 0;
  while (left >= 0) {
    if (S.substr(left, 2) == "01" || S.substr(left, 2) == "10") {
      S.erase(left, 2);
      left = S.size() - 2;
      cnt += 2;
    } else {
      --left;
    }
  }
  printf("%d\n", cnt);
}
