#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  int k, t;
  t = 0;
  cin >> n >> d;
  for (int i = 0; i < n; ++i) {
    int c;
    cin >> c;
    t += c;
  }
  if ((t + (n - 1) * 10) > d) {
    cout << "-1" << endl;
  } else {
    cout << (d - t) / 5 << endl;
  }
  return 0;
}
