#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long int k = 1, j = 0, ans = 0, len = s.length();
  while (k == 1) {
    if ((s[j] == '0' && s[j + 1] == '1') || (s[j] == '1' && s[j + 1] == '0')) {
      s.erase(j, 2);
      j = 0;
      ans += 2;
      len -= 2;
    } else {
      j++;
    }
    if (j == len) break;
  }
  cout << ans;
  return 0;
}
