def solve_newton_polynomial(newton_coeffs: list, x_values: list, x_value: float) -> float:
    """
    Function that calculate newton polynomial at x_valuew
    :param newton_coeffs: coefficients for newton polynomial
    :param x_values: our nodes
    :param x_value: current x
    :return: f(x)
    """
    length = len(x_values) - 1
    result = newton_coeffs[length]
    for k in range(1, length + 1):
        result = newton_coeffs[length - k] + (x_value - x_values[length - k]) * result
    return result