def measure_distance(segment: tuple[tuple[int, int]],
                     location: tuple[int, int]) -> int:
    """Measure distance between start of segment and a location

    :param segment: segment
    :param location: location
    :return: distance between start of segment and a location
    """
    length = 0
    length += abs(location[0] - segment[0][0])
    length += abs(location[1] - segment[0][1])
    return length