题目链接:http://codeforces.com/contest/556/problem/A
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int m;
string s;
cin>>m>>s;
int j=0;
for(int i=0; i<m; i++)
{
if(s[i]=='0')
j++;
}
cout<<abs(m-2*j);
return 0;
}