class IMSLinearRegression {

    public static double average(List<Long> input, int numberOfLastItems)
    {
        double sum = 0;
        for (int i = input.size() - numberOfLastItems; i < input.size(); i++)
        {
            sum += input.get(i);
        }
        return sum / numberOfLastItems;
    }

    private  IMSLinearRegression();

}