program Vector
 implicit none
 integer::N,ishota=0,ishotb=0,s=0,i=0
 integer,allocatable::a(:)
 read(*,*)N
 allocate(a(N))
 read(*,*)(a(i),i=1,N)
 do ishota=1,N
  do ishotb=ishota,N
   if(a(ishota)==a(ishotb))then
    s=s+1
   end if
  end do
 end do
 print'(i0)',2*N-s
 deallocate(a)
end program Vector