program main implicit none integer::N read *,N if(MOD(N,4).ne.3) then print '("O")' else print '("X")' end if end program main