program main implicit none integer(16) :: n read *, n if (mod(n-2, 2) == 1) then print '(A)', "1" stop end if if (mod(n-7, 4) == 1) then print '(A)', "1" stop end if print '(A)', "-1" end program main