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.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;

import com.sun.org.apache.xerces.internal.util.SynchronizedSymbolTable;

public class Contetst {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		/*Scanner sc =new Scanner(System.in);
		int n = sc.nextInt() ;
	
		int [] arr = new int [n] ;
		
		HashMap<Integer, Integer> map  =  new HashMap<>() ;
		
		for (int i = 0; i < arr.length; i++) {
			arr[i]=sc.nextInt();
			
			if(!(map.containsKey(arr[i])) && arr[i]!=0 )
			{
				map.put(arr[i], 0);
			}
			else
			{
				continue ;
			}
			
		}
		
		
		System.out.println(map.size());*/
		/*Scanner sc =new Scanner(System.in);
		long n = sc.nextLong();
		long month = sc.nextLong();
		month++ ;
		
          long  num1 = n ; 
          long  num2 = n ;
		if(month==1)
			System.out.println(n*n);
		else
		{
		for (int i = 0; i < month; i++) {
			num1 = num1*2 - 1 ;
			num2 = num2 *2 ;
		}
		if((num1+num2)%2==0)
			System.out.println((num1+num2)/2);
		else
			System.out.println(((num1+num2)/2)+1);
			}*/
		
		/*Scanner sc =new Scanner(System.in);
		int n = sc.nextInt();
		long []arr =new long[n];
		
		for (int i = 0; i < arr.length; i++) {
			arr[i]=sc.nextLong();
		}
		int c = 1 ;
		int max =0 ;
		
		boolean x =false ;
		for (int i = 0; i < arr.length; i++) {
			
			if(i<arr.length-1)
			{
				
				if(arr[i]<=arr[i+1])
					{c++ ;
					x=false ;
					
					}
				else
				{
					if(c>max)
						max=c;
					x=true;
					
					c=1;
				}
				
				
				
			}
				
			
			
		}
		if(max >c)
		System.out.println(max);
		else
			System.out.println(c);	
		*/
	/*Scanner sc = new Scanner(System.in);
	int a  =  sc.nextInt() ; 
	int b =  sc.nextInt() ; 
	int c =  sc.nextInt();
	
	
	int r1 = a+b*c ;
	int r2 =a*(b+c);
	int r3 = a*b*c ;
    int r4=(a+b)*c ;
    int r5 = a+b+c ;
			                   
			                
			                
			                
			                
			              int []arr = new  int[5];
			              arr[0]=r1 ;
			              arr[1]=r2 ;
			              arr[2]=r3;
			              arr[3]=r4;
			              arr[4]=r5;
			              
			              
			             
			              
			              int max = r1 ;
			                
			                
			                for (int i = 0; i <= 4; i++) {
								if(arr[i]>max)
									max=arr[i];
							}
		
		
		
		System.out.println(max);*/
		
		
		/*Scanner sc =  new Scanner(System.in);
		int n =  sc.nextInt() ;
		
		int r  =   n%5 ;
		int five =  (n-r)/5 ; //# of step length 5
		int count = five ;
        if((n-(five*5)) <5 && (n-(five*5))!=0)
        	count++;
        	
        System.out.println(count);*/
		
		/*Scanner sc = new Scanner(System.in);
		int n =  sc.nextInt() ;
		int [] arr = new  int[n];
		int [] arr1 =  new  int[n] ;
		
		for (int i = 0; i < arr.length; i++) {
			arr[i] = sc.nextInt();
			
		}
		
		for (int i = 0; i < arr1.length; i++) {
			
			int x =arr[i] ;//2
			arr1[x-1]=i+1;//
		}
			
for (int i = 0; i < arr1.length; i++) {
			
		System.out.print(arr1[i]+ " ");
		}*/
		/*Scanner sc = new Scanner(System.in);
		 String s =  sc.next() ;
		 char []ss = s.toCharArray() ;
		
		
		 String s1 = "" ;
		 int c=0 ;
		for (int i = 0; i < s.length(); i++) {
			if(i<ss.length-2)
			if(ss[i]=='W'&&ss[i+1]=='U'&&ss[i+2]=='B')
			{
				
				continue;
				
				
			}
			else
			{  
				c++;
				if(c==3) {
				s1 +=  ss[i];
				c=0;}
				
				
			}
			}
		
		
		
		
		System.out.println(s1);*/
		
		/*Scanner sc = new Scanner(System.in);
		int a =  sc.nextInt() ; 
		int  b =  sc.nextInt() ; 
		
		int  result = 0 ; 
		
		for (int i = 0; i < a; i++) {
			int  x =  sc.nextInt() ;
			if(x>b)
				result+=2 ; 
			else 
				result++;
				
			
		}
		System.out.println(result);*/
		/*Scanner sc = new Scanner(System.in);
		int a =  sc.nextInt() ; 
		int  b =  sc.nextInt() ;
	
		
		int  count = 0 ;
		while (a <= b) {
			a *= 3;
			b *= 2;
			count++;
		}
		System.out.println(count);*/
		
		/*Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		
		 
        
         int result = 0;
         
         int length1 = s1.length();
       
        
         int length2 = s2.length();
         if (length1 == length2)
         {
             for (int i = 0; i < length1; i++)
                 result += Math.abs((s2.charAt(i) - '0') - (s1.charAt(i) - '0'));
         }

         else
         {

            
             for (int i = 0; i <= s2.length() - s1.length(); i++)
             {
            	 int c = 0;
                 for (int j = i; c <= s1.length()-1 ; j++)
                 {

                     result += Math.abs((s2.charAt(j) - '0') - (s1.charAt(c) - '0'));
                     c++ ;
                     
                 }
                 c = 0;

               


             }

         }



        System.out.println(result);*/
         
		
		/*Scanner sc = new Scanner(System.in);
		int n =   sc.nextInt();
		int  m =  sc.nextInt();
		
	 String  result = "" ;
		
	   HashMap<String, String> str =  new HashMap<String ,String>();
	   for(int i = 0 ;i<m ;i++)
	   {
		    String s1 = sc.next();
			String s2 = sc.next();
		    str.put(s1, s2);
	   }
	   for(int i = 0 ;i<n ;i++)
	   {
			String s3 = sc.next();
			String  r  =  str.get(s3);
			if(i<n-1)
			{
			if(r.length() < s3.length())
			{
				result+=r +" " ;
			}
			else
			{
				result+=s3 +" " ;
			}
			}
			else
			{
				if(r.length() < s3.length())
				{
					result+=r ;
				}
				else
				{
					result+=s3 ;
				}
			}
	   }
	
		
		System.out.println(result);*/
		/*Scanner sc = new Scanner(System.in);
		
	
		int n = sc.nextInt() ;
		if(n==1)
		{
			String  s =  sc.next();
			System.out.println(s);
		}
		else
		{
			int team1 = 0 ;
			int team2 = 0 ;
			String team11 = "" ;
			String team22 = "";
			for (int i = 0; i < n; i++)
			{
				String  s =  sc.next();
				if(team11.length()==0)
		        {
					team11=s;
					team1++;
					
				}else
				{
					if(s.equals(team11))
					{
						 
					 team11=s;
					 team1++;
							
					}else
					{
						 team22=s;
						 team2++;
					}
				}
				
				
			}
			if(team1>team2)
			{
				System.out.println(team11);
			}
			else
			{
				System.out.println(team22);
			}
		}*/
		/*Scanner sc = new Scanner(System.in);
		String  s1 = sc.next();
		String  s2 = sc.next();
		String result="" ;
		for (int i = 0; i < s1.length(); i++) {
			if(s1.charAt(i)==s2.charAt(i))
			{
				result+="0";
			}
			else
			{
				result+="1";
			}
		}
		
		
		
		System.out.println(result);*/
		
		Scanner sc = new Scanner(System.in);
		
		int  n = sc.nextInt() ;
		String  s1 = sc.next();
		int zero=0  ,   one=0 ;
		for (int i = 0; i < s1.length(); i++) {
			if(s1.charAt(i)=='0')
				zero++;
			else one++;
			
		}
		System.out.println(Math.abs(one-zero));
		
		
		
		
		}
		
	}
