def count_trees(map_input):
    """
    Count the trees across the right/down path

    Args:
        map_input: Map data read from file

    Returns"
        total_trees: The total number of trees

    """
    # Instantiate counter for trees
    total_trees = 0
    # Start at position 0 for the toboggan
    toboggan_location = 0
    # Get the width of the path
    path_width = len(map_input[0])

    # Iterate over each path line by line
    for path in map_input:
        # Check if the toboggan hits a tree
        if '#' in path[toboggan_location]:
            total_trees = total_trees + 1
        # Increase the toboggan's right location by 3
        toboggan_location = toboggan_location + 3
        # Since each path repeats we cheat a bit to make that work
        if toboggan_location >= path_width:
            toboggan_location -= path_width
    return total_trees