implicit none
integer:: n,i,j,a,count
integer,allocatable:: d(:)
 
read(*,*) n
allocate(d(n))
read(*,*) d
 
do i=1,n-1
do j=i+1,n
if(d(i)>d(j))then
a=d(j+1)
d(j+1)=d(j)
d(j)=a
endif
end do
end do

 
count=1
do i=1,n-1
if(d(i)<d(i+1))then
count=count+1
endif
end do
 
end