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,6 total(i) = COUNT(L.eq.i) 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