#include <iostream>
#include <vector>

using namespace std;

int main (){
  int N;
  cin >> N;
  
  vector<char> A(N);
  int cntz = 0;
  int cnto = 0;
  for(int i = 0; i < N; i++){
    int a;
    cin >> a;
    if(a == '0')cntz++;
    if(a == '1')cnto++;
  }
  ans = 2 *  min(cntz,cnto);
  
}
