# Arup Guha
# 6/27/2012
# Turtle Example drawing a spiral square.

import turtle

def main():

    cnt = 0
    side = 10

    n = int(input("How many sides do you want on your spiral square?\n"))

    # Repeating this pattern four times draws a square.
    turtle.pendown()
    while cnt < n:

        turtle.speed(cnt%11)

        # Just draw this side and turn to the right.
        turtle.forward(side)
        turtle.left(90)
        cnt = cnt+1

        # Make the next side bigger.
        side = side + 10

main()
