#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int minSpace(vector<int>& holes, int target)
{
sort(holes.begin(), holes.end());
int left = 0;
int right = holes.back() - holes.front();
int answer = -1;
while (left <= right)
{
int mid = left + (right - left) / 2;
int count = 1;
int previous = holes[0];
for (int i = 1; i < holes.size(); i++)
{
if (holes[i] - previous >= mid)
{
count++;
previous = holes[i];
if (count >= target)
{
answer = mid;
left = mid + 1;
break;
}
}
}
if (count < target)
{
right = mid - 1;
}
}
return answer;
}
int main()
{
int n;
cin >> n;
vector<int> holes(n);
for (int i = 0; i < n; i++)
{
cin >> holes[i];
}
int target;
cin >> target;
int result = minSpace(holes, target);
cout << result << endl;
return 0;
}