Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros and ones.

Once he thought about a string of length n consisting of zeroes and ones. Consider the following operation: we choose any two adjacent positions in the string, and if one them contains 0, and the other contains 1, then we are allowed to remove these two digits from the string, obtaining a string of length n - 2 as a result.

Now Andreid thinks about what is the minimum length of the string that can remain after applying the described operation several times (possibly, zero)? Help him to calculate this number.

Input

First line of the input contains a single integer n (1 ≤ n ≤ 2·105), the length of the string that Andreid has.

The second line contains the string of length n consisting only from zeros and ones.

Output

Output the minimum length of the string that may remain after applying the described operations several times.

Examples

Input

4
1100


Output

0


Input

5
01010


Output

1


Input

8
11101111


Output

6

Note

In the first sample test it is possible to change the string like the following: <image>.

In the second sample test it is possible to change the string like the following: <image>.

In the third sample test it is possible to change the string like the following: <image>.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.Stack;
import java.util.StringTokenizer;

public class Main {
	static BufferedReader in = new BufferedReader(new InputStreamReader(
			System.in));
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
			System.out));
	final static int MOD = 1000000007;

	public static void main(String[] args) throws Exception {

		// System.out.println(Arrays.deepToString(combi));
		long test = 1;

		// long test = strToLong(in.readLine().trim()); // if number of
		// test cases
		for (int i = 0; i < test; i++) {
			req();
		}
		out.flush();

		out.close();

	}

	public static void req() throws Exception {
		int n = strToInt(in.readLine());
		
		String s  = in.readLine();
		
		Stack<Character> stack = new Stack<>();
		char c = '\0';
		
		char temp =c;
		for(int i =0;i<n;i++)
		{
			c = s.charAt(i);
			
			if(!stack.isEmpty())
			{
				temp = stack.peek();
				if(temp==c)
				{
					stack.push(c);
				}
				else
				{
					stack.pop();
				}
			}
			else
			{
				stack.push(c);
			}
			
		}
		
		
		System.out.println(stack.size());
		
		
		

	}

	// takes a string with spaces as input and produces an array of long of
	// length n
	// input should be valid
	// should know length of array beforehand
	static long[] splits(String s, int n) {

		long[] out = new long[n];
		int idx = 0;

		StringTokenizer ss = new StringTokenizer(s);
		while (ss.hasMoreTokens()) {
			out[idx] = strToLong(ss.nextToken());

			idx++;
		}

		return out;

	}

	// returns gcd of two long parameters
	// i think its algo by euclid :P
	static long gcd(long a, long b) {

		return b == 0 ? a : gcd(b, a % b);
	}

	// returns maximum among two long
	public static long max(long a, long b) {
		return a > b ? a : b;
	}

	// modulus of product of two long parameter
	public static long modPro(long a, long b) {
		// check value of MOD , may vary for different questions
		// or change the function to take mod as an input parameter :P
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static long modInv(long a) {
		return new BigInteger(a + "").modPow(new BigInteger((MOD - 2) + ""),
				new BigInteger(MOD + "")).longValue();
	}

	// returns minimum among two long
	public static long min(long a, long b) {
		return a < b ? a : b;
	}

	// take a string as input and convert it to an integer
	// takes care of negatives
	// no commas or space expected in string
	// copied from codechef
	public static int strToInt(String str) {
		int i = 0;
		int num = 0;
		boolean isNeg = false;
		// Check for negative sign; if it's there, set the isNeg flag
		if (str.charAt(0) == '-') {
			isNeg = true;
			i = 1;
		}
		// Process each character of the string;
		while (i < str.length()) {
			num *= 10;
			num += str.charAt(i++) - '0'; // Minus the ASCII code of
											// '0' to get
			// the value of the charAt(i++).
		}
		if (isNeg)
			num = -num;
		return num;
	}

	// take a string as input and convert it to a long
	// takes care of negatives
	// no commas or space expected in string
	// copied from codechef
	public static long strToLong(String str) {
		int i = 0;
		long num = 0;
		boolean isNeg = false;
		// Check for negative sign; if it's there, set the isNeg flag
		if (str.charAt(0) == '-') {
			isNeg = true;
			i = 1;
		}
		// Process each character of the string;
		while (i < str.length()) {
			num *= 10;
			num += str.charAt(i++) - '0'; // Minus the ASCII code of
											// '0' to get
			// the value of the charAt(i++).
		}
		if (isNeg)
			num = -num;
		return num;
	}

}