# Arup Guha
# 1/11/2013
# Solution to Programming Knights Practice Program Chapter 3 Problem 7
# Turtle Spiral Triangle

import turtle

def main():

    # Get the user input.
    n = int(input("How many sides do you want on your spiral triangle?\n"))

    # Initialize variables.
    turtle.pendown()
    side = 10

    # The only difference from the square is that the turn is 120 degrees.
    for i in range(n):
        turtle.forward(side)
        turtle.right(120)
        side = side + 10

main()
        
