n = int(input()) if n == 1: print(-1) exit() one = [[7, 14, 0, 8], [4, 12, 2, 11], [15, 9, 6, 1], [13, 10, 5, 3]] zero = [[0,1,2,3],[4,5,6,7],[8,9,10,11],[12,13,14,15]] for i in range(3, n+1): m = 1<