program main
   integer, allocatable :: d(:), c(:)
   read(*, *)N
   allocate(d(N))
   read(*, *) d
   c = (/d(1)/)
   do i = 2, N
      if(any(c == d(i))) cycle
      c = [c, d(i)]
   enddo
   write(*, *) size(c)
   deallocate(d)
   deallocate(c)
end
