CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
ansk = 0
tmp = 0
for i in range(N-1):
    if tmp > 0:
        tmp -= 1
        continue
    ans = 0
    for j in range(i+1,N):
            if H[j-1] < H[j]:
                tmp = ans
                ansk = max(ansk,ans)
                break
            ans += 1
            if j == N-1:
                ansk = max(ansk,ans)
                break
print(ansk)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
ansk = 0
tmp = -1
while tmp < N:
    tmp += 1
    if ans > 0:
        tmp += ans-1
        ans = 0
        continue
    for j in range(tmp+1,N):
            if H[j-1] < H[j]:
                ansk = max(ansk,ans)
                break
            ans += 1
            if j == N-1:
                ansk = max(ansk,ans)
                tmp = N
                break
print(ansk)
# Original solution
n = int(eval(input()))
hs = [int(x) for x in input().split()]

candidates = []

for i in range(n-1):
  if hs[i] >= hs[i+1]:
    candidates.append(i)

curr_height = 0
max_stepnum = 0
for start_point in candidates:
  stepnum = 0
  curr_height = hs[start_point]
  for i in range(start_point+1, n):
    if curr_height >= hs[i]:
      stepnum += 1
      curr_height = hs[i]
    else:
      break
  if stepnum > max_stepnum:
    max_stepnum = stepnum

print(max_stepnum)


# Optimized solution
n = int(eval(input()))
hs = [int(x) for x in input().split()]

curr_height = 0
max_stepnum = 0
start_point = 0

while start_point < n-1:
  stepnum = 0
  curr_height = hs[start_point]
  for i in range(start_point+1, n):
    if curr_height >= hs[i]:
      stepnum += 1
      curr_height = hs[i]
    else:
      start_point = i
      break
  else:
     start_point = n-1

  if stepnum > max_stepnum:
    max_stepnum = stepnum

print(max_stepnum)
# Original solution
n=int(eval(input()))
ls = list(map(int,input().split()))
ans = 0
for i in range(n-1):
  for j in range(n-i):
    if i+1!=n and ls[i]<ls[i+1]:
      break
    else:
      i+=1
  ans = max(ans,j)
  if ans > n-1-i:
    break
print(ans)

# Optimized solution
n=int(eval(input()))
ls = list(map(int,input().split()))
ls2 = [0]*(n+1)
for i in range(n-1):
  if ls[i]<ls[i+1]:
    ls2[i+1]=ls2[i]*0
  elif ls[i]>=ls[i+1]:
    ls2[i+1]=ls2[i]+1
print((max(ls2)))
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))

c = 0
a = 0   
for i in range(n-1):
  if h[i] >= h[i+1]:
    c += 1
  else:
    a = max(c, a)
    c = 0
    
a = max(c, a)    
print(a)


# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
curr = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    curr += 1
  else:
    ans = max(ans, curr)
    curr = 0
else:
  ans = max(ans, curr)
  
print(ans)
# Original solution
N = int(eval(input()))
masu = list(map(int, input().split()))
masu2 = [None] * N
cnt_max = 0
for i in range(N):
    cnt = 0
    for j in range(i, N-1):
        if masu[j] < masu[j+1]:
            break
        cnt += 1
    masu2[i] = cnt
print((max(masu2)))

# Optimized solution
N = int(eval(input()))
masu = list(map(int, input().split()))
cnt = 0
masu2 = []
for i in range(N-1):
    if masu[i] < masu[i+1]:
        masu2.append(cnt)
        cnt = 0
    else:
      cnt += 1
else:
  masu2.append(cnt)
print((max(masu2)))
# Original solution
def main():
    N = int(eval(input()))
    H = [int(x) for x in input().split()]
    ans = 0
    count = 0

    if N == 2:
        if H[0] >= H[1]:
            ans = 1
    elif N > 2:
        for i in range(1, N):
            j = i + 1
            if H[-i] <= H[-j]:
                count += 1
                if j == N:
                    if ans <= count:
                        ans = count
            else:
                if ans <= count:
                    ans = count
                count = 0
    print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
def main():
    N = int(eval(input()))
    H = [int(x) for x in input().split()]
    ans = 0
    count = 0

    if N > 1:
        for i in range(1, N):
            j = i + 1
            if H[-i] <= H[-j]:
                count += 1
                if j == N:
                    if ans <= count:
                        ans = count
            else:
                if ans <= count:
                    ans = count
                count = 0
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))
H = [int(n) for n in input().split()]

max_count = 0
for i in range(N):
    count = 0
    for j in range(0, N-i-1):
        if H[i+j+1] <= H[i+j]:
            count += 1
        else:
            max_count = max(max_count, count)
            break
    else:
        max_count = max(max_count, count)
print(max_count)

# Optimized solution
N = int(eval(input()))
H = [int(n) for n in input().split()]
reached = [False] * N 

max_count = 0
for i in range(N):
    if reached[i] == True:
        continue
    else:
        count = 0
        for j in range(0, N-i-1):
            if H[i+j+1] <= H[i+j]:
                count += 1
                reached[i+j+1] = True
            else:
                max_count = max(max_count, count)
                break
        else:
            max_count = max(max_count, count)
print(max_count)
# Original solution
t=eval(input())
s=list(map(int,input().split()))
a=int(t)
list=[]
for i in range(a-1):
  if s[i]>=s[i+1]:
    list.append(1)
  else:
    list.append(0)
d=0
for i in range(a-1):
  c=0
  for j in range(i,a-1):
    if list[j]==1:
      c += 1
    else: 
      break
  d=max(d,c)
print(d)

# Optimized solution
t=eval(input())
s=list(map(int,input().split()))
a=int(t)
list=[]
for i in range(a-1):
  if s[i]>=s[i+1]:
    list.append(1)
  else:
    list.append(0)
d=0
c=0
for i in range(a-1):
  if list[i]==1:
    c+=1
    d=max(d,c)
  else:
    c=0
print(d)
# Original solution
N=int(eval(input()))
list1=list(map(int,input().split()))
#print(list1)

ans_list=[]
ans=0
for i in range(N):
	j=i
	ans=0
	while True:
		if j==N-1:
			break
		if list1[j]>=list1[j+1]:
			ans+=1
			j+=1
		else :
			break

	ans_list.append(ans)
print((max(ans_list)))

# Optimized solution
N=int(eval(input()))
list1=list(map(int,input().split()))
#print(list1)
ans_list=[]
j=0
while True:
	ans=0
	while True:
		if j==N-1:
			break
		if list1[j]>=list1[j+1]:
			ans+=1
			j+=1
		else :
			break
	j+=1
	ans_list.append(ans)
	if j==N:
		break
print((max(ans_list)))
# Original solution
N = int(eval(input()))
H = [int(i) for i in input().split()]

res = 0
cur_cnt = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    cur_cnt += 1
  else:
    cur_cnt = 0
  
  if cur_cnt > res:
      res = cur_cnt

print(res)


# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))

ans = 0
tmp = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    tmp += 1
    if tmp > ans:
      ans = tmp
  else:
    tmp = 0
print(ans)
# Original solution
import sys
input=sys.stdin.readline
n=int(eval(input()))
high=list(map(int,input().split()))
ans=[]
for i in range(n):
    count=0
    for k in range(i,n-1):
        if high[k]>=high[k+1]:
            count+=1
        else:
            break
    ans.append(count)

print((max(ans)))

# Optimized solution
n=int(eval(input()))
high=list(map(int,input().split()))
ans=[]
count=0
MaxC=0
for k in range(n-1):
    if high[k]>=high[k+1]:
        count+=1
        MaxC=max(MaxC,count)
    else:
        count=0
print(MaxC)
# Original solution
N = int(eval(input()))
numbers = list(map(int, input().split()))

ans = 0
for i in range(N-1):
  x = 0
  for j in range(i, N-1):
    if numbers[j] >= numbers[j + 1]:
      x += 1
      i += 1
      if j == N - 2:
        if x > ans:
          ans = x
    else:
      if x > ans:
        ans = x
      break
      
print(ans)

# Optimized solution
def resolve():
    n = int(eval(input()))
    h = list(map(int, input().split()))
    c = 0
    ans = 0
    for i in range(n - 1):
        if h[i + 1] <= h[i]:
            c += 1
            if c > ans:
                ans = c
        else:
            c = 0
    print(ans)
 
 
if __name__ == '__main__':
    resolve()
# Original solution
# encoding: utf-8

N=int(eval(input()))
H=list(map(int, input().split()))

def get_distance(s,H):
    distance=0

    for i in range(s,len(H)-1):
        if H[i+1] <= H[i]:
            distance += 1
        else:
            break
    
    return distance

ans = 0
i=0

while i < N:
    t = get_distance(i,H)
    if ans < t:
        ans = t
    i += 1

print(ans)

# Optimized solution
# encoding: utf-8

N=int(eval(input()))
H=list(map(int, input().split()))

def get_distance(s,H):
    distance=0

    for i in range(s,len(H)-1):
        if H[i+1] <= H[i]:
            distance += 1
        else:
            break
    
    return distance

ans = 0
i=0

while i < N:
    t = get_distance(i,H)
    if ans < t:
        ans = t
    i += t + 1

print(ans)
# Original solution
n=int(eval(input()))
h=list(map(int,input().split()))
r=[None]*(n-1)
for i in range(n-1):
  if h[i]>=h[i+1]:
    r[i]=True
  else:
    r[i]=False

m=0
count=0
for i in range(len(r)):
  if r[i]:
    count=count+1
    m=max(m,count)
  else:
    count=0

print(m)

# Optimized solution
N=int(eval(input()))
H=list(map(int,input().split()))
cur=H[0]
streak=0
ans=0
for i in range(1,N):
  if H[i]<=cur:
    streak+=1
    if ans<streak:
      ans=streak
  else:
    streak=0
  cur=H[i]

print(ans)
# Original solution
import sys
import bisect
input = sys.stdin.readline

def main():
    n = int(eval(input()))
    s = list(map(int,input().split()))
    ans=0
    point=-1
    for i in range(n-1):
        mark=0
        if i > point and i + ans < n:
            for j in range(n-i-1):
                if s[i+j]>=s[i+j+1]:
                    mark+=1
                    if mark>=ans:
                        ans=mark
                        point=i+j+1
                else:
                    break
    print(ans)
main()

# Optimized solution
def main():
    n = int(eval(input()))
    s = list(map(int,input().split()))
    ans=0
    point=-1
    for i in range(n-1):
        mark=0
        if i > point and i + ans < n:
            for j in range(n-i-1):
                if s[i+j]>=s[i+j+1]:
                    mark+=1
                    if mark>=ans:
                        ans=mark
                else:
                    if mark>=ans:
                        ans=mark
                        point=i+j
                    break
    print(ans)
main()
# Original solution
import sys
N = int(eval(input()))
H = input().split()

count = 0
max = 0
flag = []
for i in (list(range(int(N)-1))):
  if(int(H[i]) >= int(H[i+1])):
    flag.append(i)
  else:
    continue

H.append(10000000000)

for i in flag:
  for j in range(i,int(N)):
    if(int(H[j]) >= int(H[j+1])):
      continue
    else:
      count = j - i
      break

  if (max < count):
    max = count
    count = 0

print(max)


# Optimized solution
n = int(eval(input()))
L = list(map(int,input().split()))
 
count = 0
mcount = 0
for i in range(1,n):
      if L[i - 1] >= L[i]:
            count += 1
            if count >= mcount:
                  mcount = count
      else:
            count = 0
print(mcount)
# Original solution
n=int(eval(input()))
h=[int(i) for i in input().split()]
c=0
d=c
for i in range(n-1):
    if h[i]>=h[i+1]:
        c+=1
    else:
        d=max([c,d])
        c=0

print((max([c,d])))

# Optimized solution
n = int(eval(input()))
L = list(map(int, input().split()))
tmp = 0
result = 0

for i in range(n-1):
    if L[i] >= L[i+1]:
        tmp += 1
    else:
        if tmp > result:
            result = tmp
        tmp = 0
if tmp > result:
    result = tmp
print(result)
# Original solution
def c_lower():
    N = int(eval(input()))
    H = [int(i) for i in input().split()]
    can_move = [0] * N
    for i in range(N - 1):
        if H[i] >= H[i + 1]:
            can_move[i] = 1
    cnt = 0
    for i in range(N - 1, -1, -1):
        if can_move[i] != 0:
            cnt += 1
            can_move[i] = cnt
        else:
            cnt = 0
    return max(can_move)

print((c_lower()))

# Optimized solution
def c_lower():
    N = int(eval(input()))
    H = [int(i) for i in input().split()] + [float('inf')]

    can_move = []
    tmp = 0
    for i in range(N):
        if H[i] >= H[i + 1]:
            tmp += 1
        else:
            can_move.append(tmp)
            tmp = 0
    return max(can_move)

print((c_lower()))
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
h.reverse()
k = [0]
s = 0
for i in range(n-1):
  if h[i] <= h[i+1]:
    s += 1
    k.append(s)
  else:
    s = 0
    k.append(s)    
ans = max(k)
print(ans)


# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))
h.reverse()
k = [0]*n
for i in range(1, n):
  if h[i-1] <= h[i]:
    k[i] = k[i-1] + 1   
ans = max(k)
print(ans)
# Original solution
n = int(eval(input()))
H = list(map(int, input().split()))

tmp = H[0]
cnt = 0
ans = 0
for h in H[1:]:
    if tmp >= h:
        cnt += 1
    else:
        cnt = 0
    tmp = h
    ans = max(ans, cnt)
print(ans)

# Optimized solution
n = int(eval(input()))
H = list(map(int, input().split()))

cnt = 0
ans = 0
tmp = H[0]
for h in H[1:]:
    if h <= tmp:
        cnt += 1
    ans = max(ans, cnt)
    if h > tmp:
        cnt = 0
    tmp = h

    
print(ans)
# Original solution
N = int(eval(input()))
H = [int(i) for i in  input().split()]
length = len(H)
def z_counter(start):
  cnt = 0
  for i in range(start+1, length):
    if H[i] <= H[i-1]:
      cnt += 1
    else:
      break
  return cnt
ans = 0
for i in range(1, length):
  ans = max(ans, z_counter(i))

print(ans)

# Optimized solution
N=int(eval(input()))
H=list(map(int,input().split()))
h=[0]*N
count=0
for i in range(1,N):
    if H[i-1]>=H[i]:
        count+=1
    else:
        count=0
    h[i]=count
print((max(h)))
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))

max_step = 0
for i in range(n):
    current_step = 0
    for j in range(i + 1, n):
        if h[j - 1] >= h[j]:
            current_step += 1
            if current_step > max_step:
                max_step = current_step
        else:
            i = j
            break
print(max_step)


# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))

max_step = 0
current_step = 0
for i in range(n - 1):
    if h[i] >= h[i + 1]:
        current_step += 1
        if current_step > max_step:
            max_step = current_step
    else:
        current_step = 0
print(max_step)
# Original solution
N = int(eval(input()))
H = list(map(int,input().split()))
L = []
M = [0]
t = 0
for i in range(N-1):
    if H[i] >= H[i+1]:
        L.append(1)
    else:
        L.append(0)

for i in range(N-1):
    if L[i]==1:
        t += 1
        M.append(t)
    else:
        t = 0
if not M:
    print((0))
else:
    print((max(M)))

# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))
from itertools import groupby
t=[]
for i in range(1,n):
  if h[i]-h[i-1]<=0:t.append(1)
  else:t.append(0)
gr=groupby(t)
ans=0
for k,g in gr:
  if k==1:
    t=len(list(g))
    ans=max(ans,t)
print(ans)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))

ans = [0]*n
for i in range(n):
    for j in range(i, n-1):
        if h[j] >= h[j+1]:
            ans[i] += 1
        else:
            break
print((max(ans)))


# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))

cnt = 0
ans = 0
for i in range(n-1):
        if h[i] >= h[i+1]:
            cnt += 1
        else:
            ans = max(ans, cnt)
            cnt = 0
print((max(ans, cnt)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
max = 0
 
for i in range(N-1):
  cnt = 0
  now = i
  while H[now] >= H[now+1]:
    now += 1
    cnt += 1
    if now >= N-1:
      break
  if max < cnt:
    max = cnt
print(max)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
H.reverse()
max = 0
cnt = 0
 
for i in range(N-1):
  if H[i] <= H[i+1]:
    cnt += 1
  else:
    cnt = 0
  if cnt > max:
    max = cnt
if cnt > max:
  max = cnt
print(max)
# Original solution
# -*- coding: utf-8 -*-
def main():
    N = int(eval(input()))
    H = list(map(int,input().split()))
    cnt = 0
    flg = 0
    for i in range(N):
        if flg!=0:
            if i==flg:
                flg=0
            else:
                continue
        tmp=0
        for j in range(i,N-1):
            if H[j]>=H[j+1]:
                tmp+=1
            else:
                flg=j+1
                break
        if cnt < tmp:
            cnt=tmp
        if cnt >= N-1:
            print(cnt)
            return
    print(cnt)


if __name__ == '__main__':
    main()

# Optimized solution
# -*- coding: utf-8 -*-
def main():
    N = int(eval(input()))
    H = list(map(int,input().split()))
    cnt = 0
    flg = 0
    for i in range(N):
        if cnt >= N-i:
            print(cnt)
            return
        if flg!=0:
            if i==flg:
                flg=0
            else:
                continue
        tmp=0
        for j in range(i,N-1):
            if H[j]>=H[j+1]:
                tmp+=1
            else:
                flg=j+1
                if cnt >= N-j+1:
                    print(cnt)
                    return
                break
        if cnt < tmp:
            cnt=tmp
    print(cnt)


if __name__ == '__main__':
    main()
# Original solution
    # -*- coding: utf-8 -*-
def main():
    N = int(eval(input()))
    H = list(map(int,input().split()))
    cnt = 0
    flg = 0
    for i in range(N):
        # if cnt >= N-i:
        #     print(cnt)
        #     return
        if flg!=0:
            if i==flg:
                flg=0
            else:
                continue
        tmp=0
        for j in range(i,N-1):
            if H[j]>=H[j+1]:
                tmp+=1
            else:
                flg=j+1
                if cnt >= N-j+1:
                    print(cnt)
                    return
                break
        if cnt < tmp:
            cnt=tmp
    print(cnt)


if __name__ == '__main__':
    main()


# Optimized solution
    # -*- coding: utf-8 -*-
def main():
    N = int(eval(input()))
    H = list(map(int,input().split()))
    cnt = 0
    flg = 0
    for i in range(N):
        if cnt >= N-i:
            print(cnt)
            return
        if flg!=0:
            if i==flg:
                flg=0
            else:
                continue
        tmp=0
        for j in range(i,N-1):
            if H[j]>=H[j+1]:
                tmp+=1
            else:
                flg=j+1
                # if cnt >= N-j+1:
                #     print(cnt)
                #     return
                break
        if cnt < tmp:
            cnt=tmp
    print(cnt)


if __name__ == '__main__':
    main()
# Original solution
import sys
def input():
    return sys.stdin.readline()[:-1]
N = int(eval(input()))
A = list(map(int, input().split()))
B = [0 for i in range(N)]
for i in range(N):
    for j in range(i,N-1):
        if A[j]>=A[j+1]:
            B[i]+=1
        else:
            break
print((max(B)))

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
ans = 0
count = 0
for i in range(N-1):
    if A[i]>=A[i+1]:
        count += 1
    else:
        ans = max(ans,count)
        count = 0
ans = max(ans,count)
print(ans)
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))
b = [a[i]-a[i+1] for i in range(n-1)]
c = [0]
x = 0
for i in range(n-1):
    if b[i] >= 0:
        x += 1
        c.append(x)
    else:
        x = 0
print((max(c)))

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
c = [0]
x = 0
for i in range(n-1):
    if a[i] >= a[i+1]:
        x += 1
        c.append(x)
    else:
        x = 0
print((max(c)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
C = []

H.append(max(H)+1)
for s in range(N):
  i = 0
  while H[s+i] >= H[s+i+1]:
    i += 1
  C.append(i)
print((max(C)))

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
C = [0]

for i in range(1, len(H)):
  if H[i-1] < H[i]:
    C.append(i)
C.append(N)
    
D = [C[j+1] - C[j] - 1 for j in range(len(C)-1)]

print((max(D)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

ans = 0

for i in range(N-1):
    count = 0
    for j in range(i, N):
        try:
            if H[j] < H[j+1]:
                break
            else:
                count += 1
        except IndexError:
            pass

    ans = max(ans, count)

print(ans)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))

count = 0
ans = 0
a = 0

for i in H:
    a, b = i, a

    if a <= b:
        count += 1
    else:
        count = 0

    ans = max(ans, count)

print(ans)
# Original solution
n = int(eval(input()))
h = list(map(int,input().split()))
h.append(10**10)
ans = 0

for i in range(n):
  cnt = 0
  for j in range(i,n):
    if h[j]>=h[j+1]:
      cnt +=1
    else:
      if cnt > ans:
        ans = cnt
      break

print(ans)

# Optimized solution
n = int(eval(input()))
h = list(map(int,input().split()))
h = h[::-1]
h.append(10**10)
cnt = 0
L = []
for i in range(n):
  L.append(cnt)
  if h[i+1]>=h[i]:
    cnt +=1
  else:
    cnt =0
print((max(L)))
# Original solution
n = int(eval(input()))
h = list(map(int,input().split()))

max_ctn = 0
for i in range(n):
    tmp_ctn = 0
    for j in range(i,len(h)-1):
        if h[j] >= h[j+1]:
            tmp_ctn += 1
            continue
        i = j
        break
    if max_ctn < tmp_ctn:
        max_ctn = tmp_ctn
print(max_ctn)

# Optimized solution
n = int(eval(input()))
h = list(map(int,input().split()))

max_ctn = 0
start = 0
for i in range(0,n):
    tmp_ctn = 0
    i +=start
    for j in range(i,len(h)-1):
        if h[j] >= h[j+1]:
            tmp_ctn += 1
            start +=1
            continue
        break
    if max_ctn < tmp_ctn:
        max_ctn = tmp_ctn
print(max_ctn)
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

max = 0
for i in range(N-1):
    count = 0
    for j in range(i, N-1):
        if H[j] >= H[j+1]:
            count += 1
        else:
            break
    if count > max:
        max = count

print(max)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))

updown = ['-' if H[i+1] <= H[i] else '+' for i in range(N-1)]
count = 0
max = 0
for i in updown:
    if i == '-':
        count += 1
    else:
        if count > max:
            max = count
        count = 0
if count > max:
    max = count
print(max)
# Original solution
import collections,sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
N = I()
S = S()
ans = 0
for i in range(N):
    set_top = set()
    set_bottom = set()
    for s in collections.Counter(S[:i]):
        set_top.add(s)
    for s in collections.Counter(S[i:]):
        set_bottom.add(s)
    ans = max(ans,len(set_top&set_bottom))
print(ans)


# Optimized solution
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
N = I()
S = S()
ans = 0
for i in range(N):
    ans = max(ans,len(set(S[:i])&set(S[i:])))
print(ans)
# Original solution
N = int(eval(input()))
S = input().strip()
cmax = 0
for i in range(N-1):
    S1 = S[:i+1]
    S2 = S[i+1:]
    hist = {chr(i):0 for i in range(97,123)}
    cnt = 0
    for j in range(i+1):
        a = S1[j]
        if hist[a]==1:continue
        hist[a] = 1
        flag = 0
        for k in range(len(S2)):
            if S2[k]==a:
                flag = 1
                break
        if flag==1:
            cnt += 1
    cmax = max(cmax,cnt)
print(cmax)

# Optimized solution
N = int(eval(input()))
S = input().strip()
cmax = 0
for n in range(1,N-1):
    X = S[:n]
    Y = S[n:]
    Cx = {}
    Cy = {}
    for i in range(n):
        a = X[i]
        if a not in Cx:
            Cx[a] = 0
        Cx[a] += 1
    for i in range(N-n):
        a = Y[i]
        if a not in Cy:
            Cy[a]=0
        Cy[a] += 1
    cnt = 0
    for a in Cx:
        if a in Cy:
            cnt += 1
    cmax = max(cmax,cnt)
print(cmax)