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