def Dk(Y, k):
    """
    Calculate Dk for Sk(x)

    Parameters
    ----------
        Y : list
            list of y values
        k : int
            index from Y
    
    Returns
    -------
        float
            Dk from cubic spline
    """
    return Y[k]