implicit none integer::N,i integer,allocatable::L(:) integer::total(6),max data total/6*0/ read *,N allocate(L(N)) read *,L do i=1,N total(L(i))=total(L(i))+1 end do max=MAXVAL(total) do i=6,1,-1 if(max.eq.total(i)) then print '(i0)',i return end if end do end program