Biologists have discovered a strange DNA molecule, best described as a sequence of A
's.
Biologists found that very odd, so they began studying the mutations in greater detail.
They discovered two types of mutations. One type results in changing a single character of the
sequence
Compute the least possible number of mutations that could convert the starting molecule to its end
state (containing only A
characters). Mutations can occur in any order.
Input Specification
The first line of input contains the positive integer
The second line of input contains a string with
This string represents the starting state of the molecule.
Output Specification
The first and only line of output must contain the required minimum number of mutations.
Sample Input 1
4
ABBA
Sample Output 1
2
Sample Input 2
5
BBABB
Sample Output 2
2
Sample Input 3
12
AAABBBAAABBB
Sample Output 3
4
Comments