#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static int mod = 1000000007;
static int large = 1000000000;
int dx[8] = {1, -1, 0, 0, 1, 1, -1, -1};
int dy[8] = {0, 0, 1, -1, 1, -1, 1, -1};
string s;
int ans;
int main() {
  cin >> s;
  bool flag = true;
  while (flag) {
    flag = false;
    for (long long i = 0; i < (long long)s.length() - 1; ++i) {
      if ((s[i + 1] == '0' && s[i] == '1') ||
          (s[i + 1] == '1' && s[i] == '0')) {
        flag = true;
        ans += 2;
        s.erase(s.begin() + (i + 1));
        s.erase(s.begin() + i);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
