#include <bits/stdc++.h>
using namespace std;
int n, d;
int a[109];
int cur_tm;
int res;
int main() {
  cin >> n >> d;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cur_tm = (n - 1) * 10;
  for (int i = 0; i < n; i++) {
    cur_tm += a[i];
  }
  if (cur_tm > d) {
    cout << -1 << endl;
  } else {
    res = (n - 1) * 2 + (d - cur_tm) / 5;
    cout << res << endl;
  }
  return 0;
}
