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>.
#!/usr/bin/env python
# 556A_zeroes.py - Codeforces.com 556A Zeroes quiz
#
# Copyright (C) 2015 Sergey
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
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*10^5),
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.

"""

# Standard libraries
import unittest
import sys
import re

# Additional libraries


###############################################################################
# Zeroes Class
###############################################################################


class Zeroes:
    """ Zeroes representation """

    def __init__(self, args):
        """ Default constructor """

        self.list = args

    def reduce(self):
        result = 0
        ones = 0
        zeroes = 0
        for n in self.list:
            if n == 0:
                zeroes += 1
            else:
                ones += 1
        return abs(zeroes - ones)

    def calculate(self):
        """ Main calcualtion function of the class """
        result = self.reduce()

        return str(result)


###############################################################################
# Executable code
###############################################################################


def get_inputs(test_inputs=None):

    it = iter(test_inputs.split("\n")) if test_inputs else None

    def uinput():
        """ Unit-testable input function wrapper """
        if it:
            return next(it)
        else:
            return input()

    # Getting string inputs
    num = int(uinput())
    ints = [int(n) for n in uinput()]

    return ints


def calculate(test_inputs=None):
    """ Base class calculate method wrapper """
    return Zeroes(get_inputs(test_inputs)).calculate()


###############################################################################
# Unit Tests
###############################################################################


class unitTests(unittest.TestCase):

    def test_sample_tests(self):
        """ Quiz sample tests. Add \n to separate lines """
        self.assertEqual(calculate("4\n1100"), "0")
        self.assertEqual(calculate("5\n01010"), "1")
        self.assertEqual(calculate("8\n11101111"), "6")

        str = "1\n"
        for i in range(1001):
            str += "10011001"
        for i in range(10001):
            str += "10"
        self.assertEqual(calculate(str), "0")

    def test_get_inputs(self):
        """ Input string decoding testing """
        self.assertEqual(get_inputs("4\n1100"), [1, 1, 0, 0])

    def test_Zeroes_class__basic_functions(self):
        """ Zeroes class basic functions testing """

        # Constructor test
        d = Zeroes([1, 0, 0, 1])
        self.assertEqual(d.list[0], 1)

        self.assertEqual(d.reduce(), 0)

        d.list = [1, 1, 0, 0]
        self.assertEqual(d.reduce(), 0)

if __name__ == "__main__":

    # Avoiding recursion limitaions
    sys.setrecursionlimit(100000)

    if sys.argv[-1] == "-ut":
        unittest.main(argv=[" "])

    # Print the result string
    print(calculate())
