#include <bits/stdc++.h>
using namespace std;
int readint() {
  char c;
  while (c = getchar(), (c < '0' || c > '9') && c != '-')
    ;
  bool flag = (c == '-');
  if (flag) c = getchar();
  int x = 0;
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - 48;
    c = getchar();
  }
  return flag ? -x : x;
}
inline string tos(int x) {
  string s;
  while (x) s = (char)(x % 10 + '0') + s, x /= 10;
  return s;
}
long long a[2005], n, k, dp[2005];
inline long long fddp(long long x) {
  dp[0] = 0;
  long long mn, t, mx, i, j;
  for (i = 1; i <= n; i++) {
    mn = 20000000000000005;
    for (j = 0; j < i; j++) {
      t = abs(a[i] - a[j]);
      mx = (i - j) * x;
      if (i == n || t <= mx) {
        mn = min(mn, dp[j] + i - j - 1);
      }
    }
    mn = min(mn, i);
    dp[i] = mn;
  }
  return dp[n];
}
inline bool ok(long long x) {
  long long t = fddp(x);
  if (t <= k)
    return 1;
  else
    return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long l, r, md, i, j;
  l = 0, r = 2000000100, md;
  cin >> n >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  while (l < r) {
    md = (l + r) / 2;
    if (!ok(md))
      l = md + 1;
    else
      r = md;
  }
  cout << l;
  return 0;
}
