#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  string s;
  cin >> s;
  int c = s[0] == '0' ? '1' : '0';
  int ans = count(s.begin(), s.end(), c) * 2;
  cout << ans << endl;
  return 0;
}
