shil-and-lucky-string-1

Shil is your new boss and he  likes lucky strings very much. A string is called lucky  if and only if each character from first half of the string can be paired to each character from second half of the string. AND:  
In each pair, a character from the first half is strictly greater than a character from the second half OR 
In each pair, a character from the first half is strictly lesser than a character from the second half   OR 
In each pair, a character from the first half is equal to  character from the second half.  

Each character should be used exactly once in pairing.    

Your are given a string S. You want to change the minimum number of characters to make this string lucky so that you can gift it to your boss. 

Note that each character in lucky string should be in lower case alphabet ( 'a' - 'z' ).  

Input format:
The first line consists of an integer N. The second line consists of N lower case characters.    

Output format:
Print minimum number of changes required to make given string lucky.  

Constraints:
1 < N ≤ 10^5
N will be an even integer.

SAMPLE INPUT
6
aabbbb

SAMPLE OUTPUT
1

Explanation

To satisfy case 1, number of changes required is 3.
To satisfy case 2, number of changes requires is 1.
To satisfy case 3,number of changes required is 2.

Source: hackerearth | Difficulty: EASY
Tags: Sorting

Implementation


Solutions: