#include <bits/stdc++.h>
using namespace std;
long long big_mod(long long a, long long b, long long c) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long d = big_mod(a, b / 2, c);
    return ((d * d) % c);
  }
  return (((a % c) * big_mod(a, b - 1, c)) % c);
}
int dx4[] = {0, -1, 0, 1};
int dy4[] = {-1, 0, 1, 0};
int Set(int n, int pos) { return n = n | (1 << pos); }
int reset(int n, int pos) { return n = n & ~(1 << pos); }
bool check(int n, int pos) { return (bool)(n & (1 << pos)); }
long long n, m;
long long ara[105];
long long dp[105][10004];
long long call(long long i, long long v) {
  if (v >= m) return 0;
  if (i > n) return 200;
  if (dp[i][v] != -1) return dp[i][v];
  long long a = v, ret = INT_MAX;
  for (long long j = i + 1, k = j; j <= n; j++) {
    long long b = (ara[j] - j + k);
    if (b <= 0) break;
    a += b;
    ret = min(ret, 1 + call(j, a));
  }
  return dp[i][v] = ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  ;
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i <= n; i++) {
    cin >> ara[i];
    ;
  }
  sort(ara + 1, ara + n + 1);
  reverse(ara + 1, ara + n + 1);
  long long ans = call(0, 0);
  if (ans == INT_MAX) ans = -1;
  cout << ans << '\n';
  ;
  return 0;
}
