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