#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  string s;
  cin >> s;
  int ans = 0;
  int len = s.length(), i = 0;
  for (; i < len - 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++;
      if (i - 1 >= 0) i--;
      len = s.length();
      continue;
    }
  }
  for (i = 0; i < len - 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++;
      if (i - 1 >= 0) i--;
      len = s.length();
      continue;
    }
  }
  cout << ans * 2;
}
