#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9, MOD = 1e9 + 7;
const double EPS = 1e-9, PI = 3.141592653589793;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long ans = 0;
  string s;
  cin >> s;
  long long size = s.size();
  for (long long i = 0; i < size - 1; i++) {
    if ((s[i] == '0' && s[i + 1] == '1') || s[i] == '1' && s[i + 1] == '0') {
      s.erase(s.begin() + i, s.begin() + (i + 2));
      ans += 2;
      i = -1;
      size = s.size();
    }
  }
  cout << ans << "\n";
  return 0;
}
