You are given an array of integers A of size N and 3 integers l, m, n. Your task is to find the maximum value of the given function:
First line contains 4 integers and n
Second line contains N space separated integers
A single integer denoting the maximum value of the function
On choosing values of as 5 we can get the max value