#include <bits/stdc++.h>
using namespace std;
typedef vector<vector<int> > vii;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int cnt0 = 0, cnt1 = 0;
  for (char ch : s) {
    if (ch == '0')
      cnt0++;
    else
      cnt1++;
  }
  int cnt;
  cnt = min(cnt0, cnt1);
  cout << cnt * 2 << endl;
}
