def num_valid_segments(lower_bound, upper_bound, clip_length):
    """calculate the number of valid video clips in the video

    Args:
    - lower_bound (int): denotes the earliest frame in video that can be segmented
    - upper_bound (int): denotes the latest frame + 1 in video that can be segmented
    - clip_length (int): length of each clip

    Returns:
    - int: number of valid clips in th evideo
    """
    return upper_bound - clip_length - lower_bound