import turtle
import math


def drawHouse(unit):
    """
    Draws the house on the screen
    :pre: (relative) pos (0,0), heading (east), down
    :post: (relative) pos (0,0), heading (east), up
    :param unit: constant required to build the walls and roof of the house
    :return: wood required to build the house
    """
    turtle.pendown()
    turtle.left(90)
    turtle.forward(2 * unit)
    turtle.right(45)
    turtle.forward(unit * math.sqrt(2))
    turtle.right(90)
    turtle.forward(unit * math.sqrt(2))
    turtle.right(45)
    turtle.forward(2 * unit)
    turtle.left(90)
    turtle.penup()
    return 2 * unit + unit * math.sqrt(2) + unit * math.sqrt(2) + 2 * unit