# -*- coding:utf-8 -*- if __name__ == '__main__': n = input() an = list(map(int, input().split())) cnt = 0 for a in set(an): if an.count(a) == 1: cnt += 1 print(cnt)