You are given a string $s$ consisting of lowercase Latin letters. Let the length of $s$ be $|s|$. You may perform several operations on this string.

In one operation, you can choose some index $i$ and remove the $i$-th character of $s$ ($s_i$) if at least one of its adjacent characters is the previous letter in the Latin alphabet for $s_i$. For example, the previous letter for b is a, the previous letter for s is r, the letter a has no previous letters. Note that after each removal the length of the string decreases by one. So, the index $i$ should satisfy the condition $1 \le i \le |s|$ during each operation.

For the character $s_i$ adjacent characters are $s_{i-1}$ and $s_{i+1}$. The first and the last characters of $s$ both have only one adjacent character (unless $|s| = 1$).

Consider the following example. Let $s=$ bacabcab.  During the first move, you can remove the first character $s_1=$ b because $s_2=$ a. Then the string becomes $s=$ acabcab.  During the second move, you can remove the fifth character $s_5=$ c because $s_4=$ b. Then the string becomes $s=$ acabab.  During the third move, you can remove the sixth character $s_6=$'b' because $s_5=$ a. Then the string becomes $s=$ acaba.  During the fourth move, the only character you can remove is $s_4=$ b, because $s_3=$ a (or $s_5=$ a). The string becomes $s=$ acaa and you cannot do anything with it. 

Your task is to find the maximum possible number of characters you can remove if you choose the sequence of operations optimally.


-----Input-----

The first line of the input contains one integer $|s|$ ($1 \le |s| \le 100$) — the length of $s$.

The second line of the input contains one string $s$ consisting of $|s|$ lowercase Latin letters.


-----Output-----

Print one integer — the maximum possible number of characters you can remove if you choose the sequence of moves optimally.


-----Examples-----
Input
8
bacabcab

Output
4

Input
4
bcda

Output
3

Input
6
abbbbb

Output
5



-----Note-----

The first example is described in the problem statement. Note that the sequence of moves provided in the statement is not the only, but it can be shown that the maximum possible answer to this test is $4$.

In the second example, you can remove all but one character of $s$. The only possible answer follows.  During the first move, remove the third character $s_3=$ d, $s$ becomes bca.  During the second move, remove the second character $s_2=$ c, $s$ becomes ba.  And during the third move, remove the first character $s_1=$ b, $s$ becomes a.

Difficulty: interview

Starter code:

Solutions:
from sys import stdin
input = stdin.readline

n = int(input())
s = list(input().strip())

for i in range(26):
    char = chr(ord('z') - i)
    prev = chr(ord('z') - i - 1)

    updated = True
    while updated:
        updated = False
        for idx in range(len(s)-1, -1, -1):
            if s[idx] == char:
                if idx < len(s)-1 and s[idx+1] == prev:
                    s.pop(idx)
                    updated = True
                elif idx > 0 and s[idx-1] == prev:
                    s.pop(idx)
                    updated = True

print( n - len(s))



input()
s = list(input())
orig = len(s)

changed = True
while changed:
    changed = False
    for c in sorted(list(set(s)), reverse=True):
        for i in range(len(s)):
            if s[i] == c and ((i-1 >= 0 and ord(s[i-1]) == ord(s[i]) - 1) or 
                    (i + 1 < len(s) and ord(s[i+1]) == ord(s[i]) - 1)):
                s = s[:i] + s[i+1:]
                changed = True
                break
        if changed:
            break

print(orig - len(s))


import sys

# inf = open('input.txt', 'r')
# reader = (line.rstrip() for line in inf)
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__

n = int(input())
s = [ord(c) for c in input()]
ans = 0
code = 122
while code >= 97:
    toDel = []
    k = len(s)
    for i, c in enumerate(s):
        if c != code:
            continue
        if i > 0 and s[i - 1] + 1 == code:
            toDel.append(i - len(toDel))
        elif i < k - 1 and s[i + 1] + 1 == code:
            toDel.append(i - len(toDel))
    if toDel:
        for i in toDel:
            del s[i]
            ans += 1
    else:
        code -= 1
print(ans)

# inf.close()


import sys
import math
import bisect

def solve(A):
    n = len(A)
    for i in range(25, -1, -1):
        to_loop = True
        while to_loop:
            to_loop = False
            for j in range(len(A)):
                #print('A: %s, j: %d' % (str(A), j))
                if A[j] == i and j - 1 >= 0 and A[j-1] == i - 1:
                    A = A[0:j] + A[j+1:]
                    to_loop = True
                    break
                elif A[j] == i and j + 1 < len(A) and A[j+1] == i - 1:
                    A = A[0:j] + A[j+1:]
                    to_loop = True
                    break
    return n - len(A)

def main():
    n = int(input())
    A = list(input())
    for i in range(n):
        A[i] = ord(A[i]) - ord('a')
    ans = solve(A)
    print(ans)

def __starting_point():
    main()

__starting_point()

n = int(input())
s = input()


def remove(s):
    actC = 'a'
    actI = -1
    for i in range(len(s)):
        if i > 0:
            if ord(s[i])-ord(s[i-1]) == 1 and s[i] > actC:
                actC = s[i]
                actI = i
        if i < len(s)-1:
            if ord(s[i])-ord(s[i+1]) == 1 and s[i] > actC:
                actC = s[i]
                actI = i

    return actC, actI


ans = 0
actIdxToRem = remove(s)[1]
while actIdxToRem != -1:
    s = s[:actIdxToRem]+s[actIdxToRem+1:]
    ans += 1
    actIdxToRem = remove(s)[1]
print(ans)


n = int(input())

s = list(input())

letters = [0] * 26
for c in s:
    letters[ord(c) - ord('a')] += 1
it = 25


def can_be_deleted(s, i):
    if i - 1 >= 0 and i + 1 < len(s):
        return ord(s[i - 1]) + 1 == ord(s[i]) or ord(s[i + 1]) + 1 == ord(s[i])
    if i == 0:
        return ord(s[i + 1]) + 1 == ord(s[i])
    if i == len(s) - 1:
        return ord(s[i - 1]) + 1 == ord(s[i])


score = 0
while it >= 0:
    if letters[it] == 0:
        it -= 1
        continue
    i = 0
    deleted = False
    while i < len(s) and len(s) > 1:
        if s[i] == chr(ord('a') + it) and can_be_deleted(s, i):
            del s[i]
            score += 1
            deleted = True
            break
        i += 1
    if not deleted:
        it -= 1
print(score)


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return list(map(int, minp().split()))

def solve():
	n = mint()
	i = 0
	s = [0]*n
	for c in minp():
		s[i] = ord(c)-ord('a')
		i += 1
	#print(s)
	for c in range(25,0,-1):
		i = 0
		while i < len(s):
			if s[i] == c \
			and ((i > 0 and s[i-1] == c-1) \
			or (i + 1 < len(s) and s[i+1] == c-1)):
				s.pop(i)
				if i > 0:
					i -= 1
				#print(s)
			else:
				i += 1
	print(n-len(s))

#for i in range(mint())
solve()


def go():
    n = int(input())
    # b = list(map(int, input().split()))
    s = list(map(ord,input()))
    letters = sorted(set(s),reverse=True)
    for l in letters:
        l1 = l-1
        if l-1 not in letters:
            continue
        i=0
        while i<len(s):
            if s[i]!=l1:
                i+=1
            elif i>0 and s[i-1]==l:
                del s[i-1]
                i-=1
            elif i<len(s)-1 and s[i+1]==l:
                del s[i+1]
            else:
                i+=1
    # print(''.join(map(chr,s)))
    return n-len(s)


print (go())

#Pye
from os import path
from sys import stdin, stdout
if path.exists('inp.txt'): stdin = open("inp.txt", "r")
def io(): return stdin.readline()

maxn = 100005
ans = 0
q = int(io())
inp = io().split(); s = inp[0]
for i in range(25, 0, -1):
    check = 1
    while check:
        check = 0
        for j in range(len(s)):
            if j >= len(s): break
            if ord(s[j]) - ord('a') == i and j+1 < len(s) and ord(s[j+1]) - ord('a') == i-1:
                s = s[0:j:] + s[j+1::]
                ans += 1
                check = 1
            elif ord(s[j]) - ord('a') == i and j > 0 and ord(s[j-1]) - ord('a') == i-1:
                s = s[0:j:] + s[j+1::]
                ans += 1
                check = 1
print(ans)

n=int(input())
s=input()
flag=True
while flag:
    s1=""
    n1=len(s)
    m=95
    ind=-1
    for i in range(len(s)):
        k=0
        a=ord(s[i])
        if i<n1-1:
            if ord(s[i+1])-a==-1:
                if a>m:
                    m=a
                    ind=i
                continue
        if i>0:
            if ord(s[i-1])-a==-1:
                if a>m:
                    m=a
                    ind=i
                continue
    if ind==-1:
        break
    s=s[0:ind]+s[ind+1:n1]
print(n-len(s))

from sys import stdin, stdout
import traceback
import math
from collections import Counter


read = stdin.readline
write = stdout.write
writeln = lambda x: write(str(x) + "\n")


def reads(typ=int):
    return list(map(typ, read().split()))


class Sol:
    @classmethod
    def input(cls):
        s = cls()
        return s

    def solve(self):
        n = int(read())
        s = read().strip()
        self.s = s
        counts = [0] * 26
        for c in s:
            i = ord(c) - ord("a")
            counts[i] += 1
        for i in range(25, 0, -1):
            if counts[i] == 0:
                continue
            self.try_remove(i, counts[i])
        return n - len(self.s)

    def try_remove(self, ci, count):
        while self.try_remove_one(ci) and count:
            count -= 1

    def try_remove_one(self, ci):
        s = self.s
        ch = chr(ci + ord("a"))
        chl = chr(ci - 1 + ord("a"))
        for i, c in enumerate(s):
            if c != ch:
                continue
            if i > 0 and s[i - 1] == chl:
                self.s = s[:i] + s[i + 1 :]
                return True
            if i + 1 < len(self.s) and s[i + 1] == chl:
                self.s = s[:i] + s[i + 1 :]
                return True
        return False


def __starting_point():
    try:
        writeln(Sol.input().solve())
    except Exception as e:
        print("Got exception:", repr(e))
        print(traceback.format_exc())

__starting_point()

n = int(input())
s = list(input())
k = 0
answer = 0
while k == 0:
    k = 1
    mas = []
    for i in range(1, len(s)):
        if ord(s[i]) - 1 == ord(s[i - 1]):
            k = 0
            mas.append([ord(s[i]), i])
        elif ord(s[i]) + 1 == ord(s[i - 1]):
            k = 0
            mas.append([ord(s[i - 1]), i - 1])
    if mas:
        mas.sort()
        answer += 1
        ind = mas[-1][1]
        s.pop(ind)
print(answer)