#画国际象棋盘,小格边长为width

import turtle

turtle.speed(0)

width = eval(input()) #画黑格

def drawSquare(width):

turtle.pendown()

turtle.begin_fill()

turtle.fillcolor("black")

for i in range(4):

turtle.forward(width)

turtle.left(90)

turtle.end_fill()

turtle.penup()

for i in range(8):

if i % 2 == 0:#偶数行

turtle.penup()

turtle.goto(0, i * width)

turtle.pendown()

for j in range(4):

drawSquare(width)

turtle.fd(2 * width)

else: turtle.penup()

turtle.goto(width, i * width)

turtle.pendown()

for j in range(4):

drawSquare(width)

turtle.fd(2 * width)

turtle.penup()

turtle.goto(0,0)

turtle.pendown()

for i in range(4):

turtle.forward(8 * width)

turtle.left(90)

turtle.hideturtle()

turtle.done()