def part_1(commands):
    """
    Calculate the horizontal position and depth you would have after following the planned course.
    What do you get if you multiply your final horizontal position by your final depth?
    :param commands: the list of commands
    :return: product of final horizontal position and depth
    """
    horizontal_pos = 0
    depth = 0
    for command in commands:
        details = command.split()
        value = int(details[1].strip())
        if details[0] == "forward":
            horizontal_pos += value
        elif details[0] == "up":
            depth -= value
        elif details[0] == "down":
            depth += value
    print(f"Horizontal position: {horizontal_pos} and depth: {depth}")
    return horizontal_pos * depth