#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
bool ok(int m, int n, int k, vector<int> &a) {
  vector<unsigned long long> dp(n + 1, inf);
  dp[0] = 0;
  for (int i = -1; i < n; i++) {
    if (i != -1 && dp[i] == inf) continue;
    for (int j = i + 1; j <= n; j++) {
      if (i == -1) {
        dp[j] = min(dp[j], (unsigned long long)(j - i - 1));
        continue;
      }
      if (j == n) {
        dp[j] = min(dp[j], dp[i] + (j - i - 1));
        continue;
      }
      if ((unsigned long long)abs(a[i] - a[j]) <=
          (unsigned long long)(j - i) * m)
        dp[j] = min(dp[j], dp[i] + (j - i - 1));
    }
  }
  return dp[n] <= k;
}
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int l = 0, r = 2e9;
  int m;
  while (l <= r) {
    m = l + (r - l) / 2;
    bool res = ok(m, n, k, a);
    if (res)
      r = m - 1;
    else
      l = m + 1;
  }
  cout << l;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  for (; q > 0; q--) {
    solve();
    cout << '\n';
  }
}
