- Time limit: 1.00 s
- Memory limit: 512 MB
Like all other good drivers, Uolevi likes to curse, swear and honk his horn at his fellow automobile drivers. Today Uolevi is at the rear of a long line, brooding over the others’ inability to keep proper distance to the car in front. But is Uolevi really keeping his own distance?
Uolevi has calculated that in order to never have to use his breaks, he must keep a distance at least to any car in front of him where is the number of cars between Uolevi and , and is an integer constant determined by which of his cars Uolevi is currently driving. Given the value of and the distances to each of the cars ahead of Uolevi, calculate the minimum distance Uolevi should be keeping to the car directly in front, in order to not have to use breaks.
Input
The first line of input contains two integers, and , where is the number of cars in front of Uolevi. Next line contains unique integers denoting the current distance to each of the cars ahead of Uolevi.
Output
Output the minimum distance Uolevi must keep to the car directly in front, in order to not have to use his breaks.
Constraints
Examples
Input:
3 1 1 2 4
Output:
1
Input:
6 3 2 3 4 5 6 1
Output:
13