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