import math


def get_dct(input_values):
    """
    Apply DCT on list of numbers input_values,
    return list with same number of elements
    """
    matrix_size = len(input_values)
    result = [0.0] * matrix_size
    if matrix_size > 0:
        for outer_index in range(matrix_size):
            for index in range(matrix_size):
                result[outer_index] += (input_values[index]
                                        * math.cos(math.pi / matrix_size
                                                   * outer_index * (index + 0.5)))
        result[0] *= 1.0 / math.sqrt(2.0)
        for index in range(matrix_size):
            result[index] *= math.sqrt(2.0 / matrix_size)
    return result