# Arup Guha
# 6/27/2012
# Turtle Example drawing a line of mountains.
import turtle
import math
def main():
n = int(input("How many mountains do you want?\n"))
# Moves turtle to left end of the screen.
turtle.penup()
turtle.right(180)
turtle.forward(300)
turtle.right(180)
turtle.pendown()
# Setting our step size, for each side of the mountain.
step = 300//n
cnt = 0
while cnt < n:
# Use the Pythagorean theorem here, or the 90-45-45 triangle.
sidelength = step*math.sqrt(2)
# Turn to go up the mountain and then forward.
turtle.left(45)
turtle.forward(sidelength)
# Turn to go back down and go down.
turtle.right(90)
turtle.forward(sidelength)
turtle.left(45)
# Advance to the next mountain.
cnt = cnt + 1
main()