#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int X = 0;
  while (S.length() >= 2) {
    for (int i = 0; i < S.length() - 1; i++) {
      if (S[i] == '0' && S[i + 1] == '1' || S[i] == '1' && S[i + 1] == '0') {
        S.erase(i, 2);
        X += 2;
        break;
      }
    }
  }
  cout << X << endl;
}
