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