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