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.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class Main {

  static BufferedReader in;
  static PrintWriter out;
  static StringTokenizer tok;

  static void solve() throws Exception {
	  
	  int n = nextInt();
	  String s = nextLine();
	  if( s.length() == 1) {
		  System.out.println(1);
		  return ;
	  }
	  int one = 0;
	  int zero = 0;
	  for(int i = 0 ; i < s.length() ; i++ ) {
		  if(s.charAt(i) == '0')
			  zero++;
		  else
			  one++;
	  }
	  
	  System.out.println(s.length() - 2*Math.min(zero, one));

  }
  
  
  static int remove(String s) {
	  if(s.length() ==0)
		  return 0;
	  boolean found = false;
	  int index = 0;
	  for(int i = 0 ; i < s.length()-1 ; i++) {
		  if(s.charAt(i) =='0' && s.charAt(i+1) =='1') {
			  found = true;
		  }
		  if(s.charAt(i) =='1' && s.charAt(i+1) =='0') {
			  found = true;
		  }
		  if(found) {
			  index = i;
			  break;
		  }
	  }
	  if(!found)
		  return s.length();
	  
	  if(found && s.length() == 2)
		  return 0;
	  return remove(s.substring(0, index)+s.substring(index+2, s.length()));
	  
  }
  
  static void taste(int t[], int c[], int i, int j) {
	  
  }
  
  static String findDist(int r1, int c1, int n, int m, String []cave, int r2, int c2, String [][] mem) {
	  
	  if(r1 >=n || c1>=m || r1 <0 || c1 <0)
		  return "";
	  
	  if(cave[n].charAt(m) == 'X') 
		  return "";
	  
	  String value = "";
	  
	  if(r1 == r2 && c1 == c2) {
		  value = "YES";
		  return value;

	  }
	  
	  if(cave[n].charAt(m) == '.') 
		  return ".";

	  
	  String value1  = findDist(r1+1, c1, n,m, cave, r2, c2, mem);
	  String value2  = findDist(r1, c1+1, n,m, cave, r2, c2, mem);
	  String value3  = findDist(r1-1, c1, n,m, cave, r2, c2, mem);
	  String value4  = findDist(r1, c1-1, n,m, cave, r2, c2, mem);
	  
	  

	  return value;
  }

  public static void main(String args[]) {
    try {
      in = new BufferedReader(new InputStreamReader(System.in));
      out = new PrintWriter(new OutputStreamWriter(System.out));
      solve();
      in.close();
      out.close();
    } catch (Throwable e) {
      e.printStackTrace();
      System.exit(1);
    }
  }

  static int nextInt() throws IOException {
    return Integer.parseInt(next());
  }

  static int[] nextIntArray(int len, int start) throws IOException {
    int[] a = new int[len];
    for (int i = start; i < len; i++)
      a[i] = nextInt();
    return a;
  }

  static long nextLong() throws IOException {
    return Long.parseLong(next());
  }

  static long[] nextLongArray(int len, int start) throws IOException {
    long[] a = new long[len];
    for (int i = start; i < len; i++)
      a[i] = nextLong();
    return a;
  }

  static double nextDouble() throws IOException {
    return Double.parseDouble(next());
  }

  static double[] nextDoubleArray(int len, int start) throws IOException {
    double[] a = new double[len];
    for (int i = start; i < len; i++)
      a[i] = nextDouble();
    return a;
  }

  static BigInteger nextBigInteger() throws IOException {
    return new BigInteger(next());
  }

  static String next() throws IOException {
    while (tok == null || !tok.hasMoreTokens()) {
      tok = new StringTokenizer(in.readLine());
    }
    return tok.nextToken();
  }

  static String nextLine() throws IOException {
    tok = new StringTokenizer("");
    return in.readLine();
  }

  static void shuffleArray(long[] array) {
    Random random = new Random();
    for (int i = array.length - 1; i > 0; i--) {
      int index = random.nextInt(i + 1);
      long temp = array[index];
      array[index] = array[i];
      array[i] = temp;
    }
  }

  static boolean hasNext() throws IOException {
    while (tok == null || !tok.hasMoreTokens()) {
      String s = in.readLine();
      if (s == null) {
        return false;
      }
      tok = new StringTokenizer(s);
    }
    return true;
  }
  
  public int[] readIntArray(int size) throws IOException {
      int[] result = new int[size];
      for (int i = 0; i < size; i++) {
          result[i] = nextInt();
      }
      return result;
  }

}