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,5 total(i) = COUNT(L.eq.i) end do total(6) = N-SUM(total(1:5)) max=MAXVAL(total) do i=6,1,-1 if(max.eq.total(i)) then print '(i0)',i return end if end do end program