#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " | ";
  __f(comma + 1, args...);
}
void pinakipb2() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  clock_t begin = clock();
  pinakipb2();
  long long n, d;
  cin >> n >> d;
  long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long t = accumulate(arr, arr + n, 0) + 10 * (n - 1);
  long long ans = 2 * (n - 1);
  if (t <= d) {
    ans += (d - t) / 5;
    cout << ans << "\n";
  } else
    cout << -1 << "\n";
  return 0;
}
