#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T abs(T t) {
  return t < 0 ? -t : t;
}
const long long modn = 1000000007;
inline long long mod(long long x) { return x % modn; }
const int N = 2005;
const long long oo = 100000000000;
int n, k, tmp;
long long x;
long long a[N], seen[N], memo[N];
long long acc[N];
long long labs(long long x) {
  if (x < 0) return -x;
  return x;
}
long long mmin(long long a, long long b) {
  if (a < b) return a;
  return b;
}
long long solve(int i, long long v) {
  if (i == n) return 0;
  long long &m = memo[i];
  if (seen[i] == tmp) return m;
  seen[i] = tmp;
  m = oo;
  a[n] = a[i];
  for (int j = i + 1; j <= n; j++) {
    if (labs(a[j] - a[i]) <= (j - i) * v) m = mmin(m, j - i - 1 + solve(j, v));
    if (!i) m = mmin(m, j - i + solve(j, v));
  }
  return m;
}
long long bs(long long l, long long r) {
  if (l >= r) return l;
  long long m = (l + r) / 2;
  tmp++;
  if (solve(0, m) > k) return bs(m + 1, r);
  return bs(l, m);
}
int main() {
  int i;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; i++) scanf("%lld", &a[i]);
  printf("%lld\n", bs(0, 2000000000));
  return 0;
}
