@staticmethod
def b():
    (n, *a) = map(int, sys.stdin.read().split())
    c = Counter(a)
    print((sum(c.values()) - len(c)))
@staticmethod
def b():
    (n, *a) = map(int, sys.stdin.read().split())
    c = Counter(a)
    print((sum(c.values()) - len(c)))