def penalize(x, n):
    """
    Thumb-rule for the aggregation of cross-border power lines.

    Parameters
    ---------
    x : float
        total line capacity
    n : int
        number of power lines

    Returns
    -------
    c : float
        resulting capacity
    """
    if n == 1:
        return x
    elif n == 2:
        return 5.0 / 6.0 * x
    elif n == 3:
        return 4.0 / 6.0 * x
    else:
        return 0.5 * x
