#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, d;
  cin >> n >> d;
  int m = d;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    m -= x;
  }
  if (m < (n - 1) * 10)
    cout << -1 << endl;
  else
    cout << m / 5 << endl;
  cerr << 1.0 * clock() / CLOCKS_PER_SEC << endl;
  return 0;
}
