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