#include <bits/stdc++.h>
using namespace std;
string u;
int ans = 0, j = 0;
int b[100010];
int a1, a0;
int main() {
  cin >> u;
  for (int i = 0; i < u.size(); i++) {
    b[i] = u[i] - '0';
  }
  if (u.size() == 0) {
    cout << 0;
    return 0;
  } else {
    for (int i = 0; i < u.size(); i++) {
      if (b[i] == 0) {
        a0++;
      }
      if (b[i] == 1) {
        a1++;
      }
    }
  }
  if (a0 > a1) cout << 2 * a1;
  if (a0 = a1) cout << 2 * a0;
  if (a0 < a1) cout << 2 * a0;
  return 0;
}
