qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
a,b,c = map(int,input().split())

s=[abs(a-b),abs(a-c),abs(b-c)]
s.sort()
print(abs(s[0]-s[1]))

# Fixed code:
a,b,c = map(int,input().split())

s=[abs(a-b),abs(a-c),abs(b-c)]
s.sort()
print(s[0]+s[1])
# Buggy code:
c= list(map(int, input().split()))
print(max(list)-min(list))

# Fixed code:
list=list(map(int, input().split()))
print(max(list)-min(list))
# Buggy code:
def main(a: list):
    a = sorted(a)

    cost = 0

    cost += abs(a[0] - a[1])
    print(cost)
    cost += abs(a[1] - a[2])
    print(cost)

    return cost


if __name__ == '__main__':
    print(main(list(map(int, input().split(' ')))))


# Fixed code:
def main(a: list):
    a = sorted(a)

    cost = 0

    cost += abs(a[0] - a[1])
    cost += abs(a[1] - a[2])

    return cost


if __name__ == '__main__':
    print(main(list(map(int, input().split(' ')))))
# Buggy code:
a = map(int, input().split())
a.sort()
ans = 0
for i, j in zip(a, a[1:]):
  ans += abs(j - i)
print(ans)

# Fixed code:
a = sorted(map(int, input().split()))
ans = 0
for i, j in zip(a, a[1:]):
  ans += abs(j - i)
print(ans)
# Buggy code:
#103
A =[int(j) for j in input().split()]
print(abs(A[2]-A[0]))

# Fixed code:
#103
A =[int(j) for j in input().split()]
A.sort()
print(abs(A[2]-A[0]))
# Buggy code:
a = [i for i in input().split()]

b = sorted(list(set(a)))
if len(b) == 1:
    print(0)
elif len(b) == 2:
    print(int(b[0])-int(b[1]))
else:
    print(int(b[2]) - int(b[0]))


print(b)


# Fixed code:
a = [i for i in input().split()]

b = sorted(map(int, list(set(a))))

if len(b) == 1:
    print(0)
elif len(b) == 2:
    print(int(b[1])-int(b[0]))
else:
    print(int(b[2]) - int(b[0]))
# Buggy code:
a,b,c = map(int,input().split())
a,b,c = map(int,input().split())
l=sorted([a,b,c])
print(l[2]-l[1]+l[1]-l[0])


# Fixed code:
a,b,c = map(int,input().split())
l=sorted([a,b,c])
print(l[2]-l[1]+l[1]-l[0])
# Buggy code:
L=list(map(int,input().split()))
L.sort()
a=0
for i in range(len(L)-1):
    a+=L[i]-L[i-1]
    #print(i)
print(a)

# Fixed code:
L=list(map(int,input().split()))
L.sort()
a=0
for i in range(1,len(L)):
    a=a+(L[i]-L[i-1])
    #print(L[i]-L[i-1])
print(a)
# Buggy code:
l = [int(i) for i in input().split()] 
ans = 0

for i in range(len(l) - 1):
	if l[i+1] < l[i]:
	tmp = l[i+1]
	l[i+1] = l[i]
	l[i] = tmp

for i in range(len(l) - 1):
	ans += l[i+1] - l[i]

print(ans)

# Fixed code:
l = [int(i) for i in input().split()] 
ans = 0

for j in range(len(l) - 1):
	for i in range(len(l) - 1):
		if l[i+1] < l[i]:
			tmp = l[i+1]
			l[i+1] = l[i]
			l[i] = tmp
        
for i in range(len(l) - 1):
	ans += l[i+1] - l[i]
    
print(ans)
# Buggy code:
a = list(map(int, input().split()))
print(a[2] - a[0])


# Fixed code:
a = list(map(int, input().split()))

a.sort()

print(a[2] - a[0])
# Buggy code:
a = list(map(int, input().split()))
a.sort()
print(0+abs(a[2]-a[1])+abs(a[3]-a[2]))

# Fixed code:
a = list(map(int, input().split()))
a.sort()
print(0+abs(a[1]-a[0])+abs(a[2]-a[1]))
# Buggy code:
def ABC_103_A():
    A1,A2,A3 = map(int, input().split())

    cost1 = 0 + abs(A2-A1) + abs(A3-A2)
    cost2 = 0 + abs(A3-A1) + abs(A2-A3)
    cost3 = abs(A1-A2) + 0 + abs(A3-A1)
    cost4 = abs(A2-A3) + 0 + abs(A3-A2)
    cost5 = abs(A1-A3) + abs(A2-A1) + 0
    cost6 = abs(A1-A2) + abs(A2-A3) + 0

    print(min(cost1,cost2,cost3,cost4,cost5,cost6))

if __name__ == '__main__':

    ABC_103_A()

# Fixed code:
def ABC_103_A():
    A1,A2,A3 = map(int, input().split())

    cost1 = 0 + abs(A2-A3) + abs(A3-A1)
    cost2 = 0 + abs(A2-A1) + abs(A3-A2)
    cost3 = abs(A1-A2) + 0 + abs(A3-A1)
    cost4 = abs(A1-A3) + 0 + abs(A3-A2)
    cost5 = abs(A1-A3) + abs(A2-A1) + 0
    cost6 = abs(A1-A2) + abs(A2-A3) + 0

    print(min(cost1,cost2,cost3,cost4,cost5,cost6))

if __name__ == '__main__':

    ABC_103_A()
# Buggy code:
s=list(map(int,input())
s.sort()
print(s[2]-s[0])


# Fixed code:
s=list(map(int,input().split()))
s.sort()
print(s[2]-s[0])
# Buggy code:
# coding: utf-8
n = input()
list = n.split(" ")
num = [int(x) for x in list ]

print(num.max - num.min)
    

# Fixed code:
# coding: utf-8
n = input()
list = n.split(" ")
num = [int(x) for x in list ]

print(max(num)-min(num))
# Buggy code:
# -*- coding: utf-8 -*-

An = list(map(int, input().split()))

An.sort()

print(An)

i = 0
Ai = An[0]
sum = 0
for j,Aj in enumerate(An):
    i = Aj - Ai
    sum += i
    Ai = Aj

print(sum)


# Fixed code:
# -*- coding: utf-8 -*-

An = list(map(int, input().split()))

An.sort()
i = 0
Ai = An[0]
sum = 0
for j,Aj in enumerate(An):
    i = Aj - Ai
    sum += i
    Ai = Aj

print(sum)
# Buggy code:

S=list(map(int,input().split()))
S.sort
sum=0
sum += (S[1]-S[0])+(S[2]-S[1])
print(sum)

# Fixed code:

S=list(map(int,input().split()))
S.sort()
sum=0
sum += (S[2]-S[0])
print(sum)
# Buggy code:
# -*- coding: utf-8 -*-

list = list(map(int,input().split()))

print(list)

list.sort()
sum = 0;
sum = list[2]-list[1]+list[1]-list[0]

print(sum)


# Fixed code:
# -*- coding: utf-8 -*-

list = list(map(int,input().split()))
list.sort()
sum = list[2]-list[1]+list[1]-list[0]

print(sum)
# Buggy code:
a_list=list(int,input().split())
ans=abs(a[0]-a[1])+abs(a[0]-a[2])
ans=min(ans,abs(a[1]-a[0])+abs(a[1]-a[2]))
ans=min(ans,abs(a[2]-a[1])+abs(a[0]-a[2]))
print(ans)

# Fixed code:
a=list(map(int,input().split()))
ans=abs(a[0]-a[1])+abs(a[0]-a[2])
ans=min(ans,abs(a[1]-a[0])+abs(a[1]-a[2]))
ans=min(ans,abs(a[2]-a[1])+abs(a[0]-a[2]))
print(ans)
# Buggy code:
#!/usr/bin/env python3
import sys


def solve(A: "List[int]"):
    print(abs(A[0] - A[1] + abs(A[1] - A[2]))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  # type: "List[int]"
    solve(A)

if __name__ == '__main__':
    main()


# Fixed code:
#!/usr/bin/env python3
import sys


def solve(A: "List[int]"):
    print(max(A) - min(A))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  # type: "List[int]"
    solve(A)

if __name__ == '__main__':
    main()
# Buggy code:
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
bef=l[0]
for i in l:
  ans+=abs(bef-i)
print(ans)

# Fixed code:
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
bef=l[0]
for i in l:
  ans+=abs(bef-i)
  bef=i
print(ans)
# Buggy code:
A=list(map(int,input().split()))
A.sort()
for i in range(len(A)):
  if i=0:
    continue
  else:
    res=A[i]-A[i-1]
print(res)


# Fixed code:
A=list(map(int,input().split()))
A.sort()
res=0
for i in range(len(A)):
  if i==0:
    continue
  else:
    res=res+A[i]-A[i-1]
print(res)
# Buggy code:
a = list(map(int, input().split()))
print(max(a))
print(min(a))
ans = (int(max(a))) - (int(min(a)))
print(ans)


# Fixed code:
a = list(map(int, input().split()))
ans = (int(max(a))) - (int(min(a)))
print(ans)
# Buggy code:
lst = list(map(int, input().split()))
sor = sorted(lst)
cost = 0
for i in range(len(sor)):
    if i == 0:
        continue
    else:
        cost = abs(sor[i]-sor[i-1])
print(cost)

# Fixed code:
# A
lst = list(map(int, input().split()))
sor = sorted(lst)
cost = 0
for i in range(len(sor)):
    if i == 0:
        continue
    else:
        cost += abs(sor[i]-sor[i-1])
print(cost)
# Buggy code:
A1,A2,A3=map(int,input().split())

print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(A1-A2,A2-A3,A3-A1))

# Fixed code:
A1,A2,A3=map(int,input().split())

print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(abs(A1-A2),abs(A2-A3),abs(A3-A1)))
# Buggy code:
a = sorted(map(int,input().split()))

cost = 0
for i in range(1,len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

# Fixed code:
a = list(map(int,input().split()))
a = sorted(a)
cost = 0
for i in range(len(a)-1):
  cost += a[i+1]-a[i]
print(cost)
# Buggy code:
a,b,c = map(int, input().split())
print(c-a)

# Fixed code:
a,b,c=sorted(map(int,input().split()))
print(c-a)
# Buggy code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

N, K = LI()
A = LI()

if N == K:
    print(1)
    exit()
result = 0
N -= K
result += 1
result += N / (K-1)
if N % (K-1) != 0:
    result = round(result) + 1

print(result)


# Fixed code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

N, K = LI()
A = LI()

if N == K:
    print(1)
    exit()
N -= K
result = N / (K-1) + 1
if result % 1 != 0:
    result //= 1
    result += 1

print(int(result))
# Buggy code:
n,k=map(int,input().split());print(((n+2)//(k-1))+1)

# Fixed code:
n,k=map(int,input().split());print((n-2)//(k-1)+1)
# Buggy code:
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
print((N - 1) // (K - 1) + 1)

# Fixed code:
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))
print(math.ceil((N-1)/(K-1)))
# Buggy code:
import math

b, c  = [int(a) for a in input().split()]
print (math.ceil(b / ((c - 1) * 1.0)))

# Fixed code:
import math

b, c  = [int(a) for a in input().split()]
print (math.ceil((b - 1) / ((c - 1) * 1.0)))
# Buggy code:
import math
n, k = map(int,input().split())
input()
print(int(math.ceil((n - 1)//(k - 1))))


# Fixed code:
import math
n, k = map(int,input().split())
input()
print(math.ceil((n-1)/(k-1)))
# Buggy code:
N,K=map(int,input.split())
TMP=K
ANS=1
if N =< K:
  ANS=1
else:
  TMP=(K-1)
  ANS+=1
  if N <= K:
    break
print(ANS)


# Fixed code:
N,K=map(int,input().split())
TMP=K
ANS=1
if N <= K:
  ANS=1
else:
  while True:
    TMP+=(K-1)
    ANS+=1
    if N <= TMP:
      break
print(ANS)
# Buggy code:
n,k,*_=map(int,open(0).read().split())
print(~-n//~-k)

# Fixed code:
n,k,*_=map(int,open(0).read().split())
print(0--~-n//~-k)
# Buggy code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    n,k = map(int, input().split())
    a_list = list(map(int, input().split()))
    if n == k:
        print(1)
    else:
        print((n//k) + 1)


if __name__ == "__main__":
    main()

# Fixed code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    n,k = map(int, input().split())
    a_list = list(map(int, input().split()))
    print(ceil((n-1)/(k-1)))

if __name__ == "__main__":
    main()
# Buggy code:
import math
N, K = map(int,input())
A = list(map(int,input().split()))
print(math.ceil(N/(K-1)))

# Fixed code:
import math

N, K = list(map(int, input().split()))
a_list = list(map(int, input().split()))

print(math.ceil((N-1)/(K-1)))
# Buggy code:
N, K = [int(s) for s in input().split()]
print(2 + (N-K)//(K-1))

# Fixed code:
N, K = [int(s) for s in input().split()]
print(1 -(-(N-K)//(K-1)))
# Buggy code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

ans = int((n-k)/(k-1)+2)
print(ans)

# Fixed code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

ans = -((-n + 1) // (k - 1))
print(ans)
# Buggy code:
n,k=map(int,input().split())
print((n-1+k)//(k-1))

# Fixed code:
n,k=map(int,input().split())
print((n+k-3)//(k-1))
# Buggy code:
n=input().rstrip().split()
preans=int(n[0])/int(n[1])

ans=int(preans)
if int(n[0])%int(n[1])!=0:
  ans+=1
print(ans)

# Fixed code:
n=input().rstrip().split()
preans=(int(n[0])-1)/(int(n[1])-1)
 
ans=int(preans)
if (int(n[0])-1)%(int(n[1])-1)!=0:
  ans+=1
print(ans)
# Buggy code:
N,K = map(int,input().split())
A = list(map(int,input().split()))
print((N-K)//(K-1)+1)

# Fixed code:
N,K=map(int,input().split())
A=list(map(int,input().split()))
print((N-1-1)//(K-1)+1)
# Buggy code:
import math
N,K = map(int,input().split())
a = list(map(int,input().split()))
print(N,K)
print(math.ceil((N-1)/(K-1)))

# Fixed code:
import math
N,K = map(int,input().split())
a = list(map(int,input().split()))
print(math.ceil((N-1)/(K-1)))
# Buggy code:
n,k=map(int,input().split())
A=list(map(int,input().split()))

m=A.index(1)

le=m
ri=n-m
if le//(k-1)!=0 :
    ri-=(k-1)-le%(k-1)

print(le//(k-1)+ri//(k-1))


# Fixed code:
n,k=map(int,input().split())
A=list(map(int,input().split()))

#m=A.index(1)

#le=m
#ri=n-m
#if le//(k-1)!=0 :
#    ri-=(k-1)-le%(k-1)

#print(le//(k-1)+ri//(k-1))

print(int((n-1-0.1)//(k-1)+1))
# Buggy code:
def main():
    N, K = [int(x) for x in input().strip().split()]
    line = [int(x) for x in input().strip().split()]
    counter = 0
    result = 0
    while counter < N:
        counter += K - 1
        result += 1
    print(result)


if __name__ == '__main__':
    main()


# Fixed code:
def main():
    N, K = [int(x) for x in input().strip().split()]
    line = [int(x) for x in input().strip().split()]
    counter = K - 1
    result = 0
    while counter < N:
        counter += K - 1
        result += 1
    if counter - (K - 1) < N - 1:
        result += 1
    print(result)


if __name__ == '__main__':
    main()
# Buggy code:
n, k = map(int, input().split())
print(n // (k - 1) + (0 if n % (k - 1) == 0 else 1))

# Fixed code:
n,k = map(int,input().split())


if (n-1)%(k-1) == 0:
    print((n-1)//(k-1))
else:
    print((n - 1) // (k - 1)+1)
# Buggy code:
N,K = list(map(int,input().split()))
A = list(map(int,input().split()))
print((N-1)//(K-1))


# Fixed code:
N,K=list(map(int,input().split()))
print(-((1-N)//(K-1)))
# Buggy code:
import math
N, K = map(int, input().split())
a = list(map(int, input().split()))
ans = math.ceil(N / (K - 1))
print(ans)

# Fixed code:
import math
N, K = map(int, input().split())
a = list(map(int, input().split()))
ans = math.ceil((N - 1)/ (K - 1))
print(ans)
# Buggy code:
N,K=map(int,input().split())
import math
A=int(input().split())
ans=1
ans+=math.ceil(N-K)/(K-1)
print(ans)

# Fixed code:
N,K=map(int,input().split())
import math
A=list(map(int,input().split()))
ans=1
ans+=math.ceil((N-K)/(K-1))
print(ans)
# Buggy code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

if (n-k)%(k-1) ==0:
  print((n-k)//(k-1)+1)
else:
  print((n-k)//(k-1)+3)
  

# Fixed code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

if (n-k)%(k-1) == 0:
  print((n-k)//(k-1)+1)
else:
  print((n-k)//(k-1)+2)
# Buggy code:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
print((N + (K - 1) - 1) // (K - 1))

# Fixed code:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]

print(((N - 1) + (K - 1) - 1) // (K - 1))
# Buggy code:
from math import ceil
N, K = map(int, input().split())
A = list(map(int, input().split()))

num = ((N-1)//(K-1))+1

print(num)

# Fixed code:
from math import ceil
N, K = map(int, input().split())
A = list(map(int, input().split()))

num = ceil((N-1)/(K-1))

print(num)
# Buggy code:
n, k = map(int, input().split())
a = (list)(map(int, input().split()))

print(n//k+1)


# Fixed code:
n,k = list(map(int, input().split()))
a = list(map(int, input().split()))
print( (n-1 + k-1 - 1)// (k-1) )
# Buggy code:
n, k = map(int,input().split())
a = list(map(int,input().split()))
g=1
while k+(k-1)*(g-1)<= n:
  g+=1
print(g)

# Fixed code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
g=1
while k+(k-1)*(g-1)< n:
  g+=1
print(g)
# Buggy code:
N,K = map(int,input().split())
A = list(input())
Ans = 0

if (N-1)%(K-1)==0:
    Ans = Ans = N//(K-1)
else:
    Ans = N//(K-1) + 1

print(Ans)

# Fixed code:
N,K = map(int,input().split())
A = list(input())
Ans = 0

if (N-1)%(K-1)==0:
    Ans = (N-1)//(K-1)
else:
    Ans = (N-1)//(K-1) + 1

print(Ans)
# Buggy code:
N,K = map(int, input().split())
if( N%(K-1)==0 ):
    print( int(N/(K-1)) )
else:
    print( int(N//(K-1)+1) )

# Fixed code:
N,K = map(int, input().split())
if( (N-K)%(K-1)==0 ):
    print( int(1+(N-K)/(K-1)) )
else:
    print( int(1+(N-K)//(K-1)+1) )
# Buggy code:
Len, Split = map(int, input().split())
_res = Len % (Split - 1)
if _res:
    print(int((Len / (Split - 1))) + 1)
else:
    print(int((Len / (Split - 1))))

# Fixed code:
Len, Split = map(int, input().split())
_res = (Len - 1) % (Split - 1)
if _res:
    res = int(((Len - 1) // (Split - 1)) + 1)
    print(res)
else:
    res = int((Len - 1) // (Split - 1))
    print(res)
# Buggy code:
n,k = map(int,input().split())
print((n-1)//(k-1))

# Fixed code:
n, k = map(int, input().split())
aa=input() 
print(-(-(n-1) // (k-1)))
# Buggy code:
N = int(input())
S = input()
temp=0
for i in range(N-1):
    S1=S[0:i+1]
    S2=S[i+1:N]
#    print(S1 + " " + S2)
    kaburi=[]
    for s in S1:
        if s in S2 and s not in kaburi:
            kaburi.append(s)
    print (kaburi)
    if len(kaburi)>temp:
        temp = len(kaburi)
print(temp)

# Fixed code:
N = int(input())
S = input()
temp=0
for i in range(N-1):
    S1=S[0:i+1]
    S2=S[i+1:N]
#    print(S1 + " " + S2)
    kaburi=[]
    for s in S1:
        if s in S2 and s not in kaburi:
            kaburi.append(s)
    if len(kaburi)>temp:
        temp = len(kaburi)
print(temp)
# Buggy code:
n = int(input())
s = input()
c = 0

for i in range(1,n):
  s1 = set(s[:i])
  s2 = set(s[i:])
  w = lin(s1&s2)
  if w > c:
    c = w
    
print(c)

# Fixed code:
n = int(input())
s = input()
c = 0
 
for i in range(1,n):
  s1 = set(s[:i])
  s2 = set(s[i:])
  w = len(s1&s2)
  if w > c:
    c = w
    
print(c)
# Buggy code:
N = int(input())
S = str(input())
ans=0
for i in range(1:N-1):
    X = S[:i]
    Y = S[i:]
    Z = set(X) & set(Y)
    if len(Z) > ans :
        ans = len(Z)
print(ans)

# Fixed code:
N = int(input())
S = str(input())
ans=0
for i in range(1,N-1):
    X = S[:i]
    Y = S[i:]
    Z = set(X) & set(Y)
    if len(Z) > ans :
        ans = len(Z)
print(ans)
# Buggy code:
n = int(input())

s = list(input())

ans = 0

for i in range(n):
    x = s[:i+1]
    y = s[i:]
    ans = max(ans,len(set(x)&set(y)))

# Fixed code:
n = int(input())

s = list(input())

ans = 0

for i in range(n):
    x = s[:i+1]
    y = s[i+1:]
    ans = max(ans,len(set(x)&set(y)))

print(ans)
# Buggy code:
import math
def main():
  n = int(input())
  s = input()
  ans=0
  print(int(n/2)+1)
  for i in range(0,int(n/2)+2):
    sum=0
    x=s[:i+1]
    y=s[i+1:]
    while len(x)>0:
      if x[0] in y :
        sum+=1
      x=x.replace(x[0],'')
    if sum>ans:
      ans=sum
  print(ans)
main()


# Fixed code:
import math
def main():
  n = int(input())
  s = input()
  ans=0
  for i in range(0,n):
    sum=0
    x=s[:i+1]
    y=s[i+1:]
    while len(x)>0:
      if x[0] in y :
        sum+=1
      x=x.replace(x[0],'')
    if sum>ans:
      ans=sum
  print(ans)
main()
# Buggy code:
N = int(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)

# Fixed code:
N = int(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)
# Buggy code:
n = int(input())
s = input()
a = 0
for i in range(1,n):
    a = max(a,set(s[:i]) & set(s[i:]))

print(a)


# Fixed code:
n = int(input())
s = input()
a = 0
for i in range(1,n):
    a = max(a, len(set(s[:i]) & set(s[i:])))

print(a)
# Buggy code:
 n = int(input())
    s = input()

    m = 0
    for i in range(1, n - 1):
        a = s[:i]
        b = s[i:]
        c = len(set(a) & set(b))
        if c >= m:
            m = c

    print(m)

# Fixed code:
n = int(input())
s = input()

m = 0
for i in range(1, n - 1):
  a = s[:i]
  b = s[i:]
  c = len(set(a) & set(b))
  if c >= m:
    m = c

print(m)
# Buggy code:
n = int(input())
s = input()
ans = 0

for i in range(n):
    a = s[:i]
    b = s[i+1:]
    tes = 0
    c = []
    for cha in a:
        if cha in b:
            if cha not in c:
                c.append(cha)
                tes += 1
    ans = max(tes,ans)
    
print(ans)

# Fixed code:
n = int(input())
s = input()
ans = 0
 
for i in range(n):
    a = s[:i]
    b = s[i:]
    tes = 0
    c = []
    for cha in a:
        if cha in b:
            if cha not in c:
                c.append(cha)
                tes += 1
    ans = max(tes,ans)

    
print(ans)
# Buggy code:
n=int(input())
s=input()
c=0
for i in range(1,N):
  x=set(s[:i])
  y=set(s[i:])
  a=x&y
  an=len(a)
  if an>c:
    c=an
print(c)


# Fixed code:
n=int(input())
s=input()
c=0
for i in range(1,n):
  x=set(s[:i])
  y=set(s[i:])
  a = len(x & y)
  if a > c:
    c = a
print(c)
# Buggy code:
N=int(input())
S=input()
print(max(len(set(S[:i]&set(S[i:])) for i in range(N))))

# Fixed code:
N=int(input())
S=input()
print(max(len(set(S[:i]) & set(S[i:])) for i in range(N)))
# Buggy code:
n = int(input())
s = input()

max_diff = 0
for i in range(1, len(s)):
  s1 = s[:i]
  s2 = s[i:]
  diff = len(set(s1) & set(s2))
  if diff > max_diff:
    max_diff = diff
print max_diff

# Fixed code:
n = int(input())
s = input()

max_diff = 0
for i in range(1, len(s)):
  s1 = s[:i]
  s2 = s[i:]
  diff = len(set(s1) & set(s2))
  if diff > max_diff:
    max_diff = diff
print(max_diff)
# Buggy code:
import collections

N = int(input())
S = input()

m = 0
index = 0
for i in range(1, N):
    a = set(S[:i])
    b = set(S[i:])
    #print(a)
    #print(b)
    d = 0
    for c in a:
        if c in b:
            d += 1
    if d > m:
        m = d
        index = i
print(index - 1)

# Fixed code:
import collections

N = int(input())
S = input()

m = 0
index = 0
for i in range(N):
    a = set(S[:i])
    b = set(S[i:])
    d = 0
    for c in a:
        if c in b:
            d += 1
    if d > m:
        m = d
        index = i
print(m)