program main implicit none integer*8::N,m character::A(0:1) data A/"O","X"/ read *,N m = ISHFT(IAND(N,3)+1,-2) print '(a)', A(m) end program main