#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, d;
  cin >> n >> d;
  long long int a[n], s = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    s += a[i];
  }
  long long int g = (n - 1) * 10;
  s += g;
  long long int j = (n - 1) * 2;
  long long int rem = d - s, q;
  if (rem > 0) {
    q = rem / 5;
    j += q;
    cout << j << "\n";
    return;
  }
  if (rem < 0) {
    cout << "-1"
         << "\n";
    return;
  }
  cout << j << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
