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