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