# -*- coding: utf-8 -*- n = int(input()) a = [i for i in input().split()] print(len([i for i in set(a) if a.count(i) == 1]))