def separator_width(header_length, max_value_length):
    """
    Calculates the width of the '---' line that separates header from content
    """
    n_value_extra = header_length - max_value_length

    if n_value_extra >= -2:
        return header_length + 2
    else:
        return max_value_length