d={}n=int(input())stri=input()arr=stri.split()for a in arr: d[int(a)]=1print(len(d))
5 1 0 1 2 0
3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!