#include <bits/stdc++.h>
using namespace std;
long long root1(vector<long long> &par, long long ser,
                vector<long long> &path) {
  if (par[ser] == -1) {
    for (long long i = 0; i < path.size(); i++) {
      par[path[i]] = ser;
    }
    return ser;
  }
  path.push_back(ser);
  return root1(par, par[ser], path);
}
long long root(vector<long long> &par, long long ser) {
  vector<long long> emp(0);
  return root1(par, ser, emp);
}
void uni(long long x, long long y, vector<long long> &par,
         vector<long long> &rank) {
  x = root(par, x);
  y = root(par, y);
  if (x != y) {
    if (rank[x] < rank[y]) {
      par[x] = y;
    } else if (rank[x] == rank[y]) {
      par[x] = y;
      rank[x]++;
    } else {
      par[y] = x;
    }
  }
}
bool issame(long long x, long long y, vector<long long> &par) {
  return root(par, x) == root(par, y);
}
signed main() {
  string s;
  cin >> s;
  long long c0 = 0;
  long long c1 = 1;
  long long ans = 0;
  long long n = s.size();
  for (long long i = 0; i < n; i++) {
    if (s[i] == '0') {
      c0++;
    } else {
      c1++;
    }
  }
  cout << 2 * min(c0, c1) << endl;
}
