📅  最后修改于: 2022-03-11 14:47:09.242000             🧑  作者: Mango
a=int(input())
b=list(map(int,input().split()))
b.sort()
s=0
sm=[]
h=len(b)
for i in range(h):
for j in range(h):
if b[i]==b[j]:
s+=1
sm.append(s)
s=0
print(a-max(sm))