#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  cin >> s;
  int ans = 0;
  stack<int> qube;
  for (int i = 1; i < s.size(); i++) {
    qube.push(s[i]);
    if ((s[i] == '0' && s[i - 1] == '1') || s[i] == '1' && s[i - 1] == '0') {
      qube.pop();
      qube.pop();
      ans += 2;
    }
  }
  cout << ans << endl;
}
