#include <bits/stdc++.h>
using namespace std;
int main() {
  int s, t;
  cin >> s >> t;
  vector<int> v;
  for (int i = 0; i < s; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  int sum = 0;
  sum = accumulate(v.begin(), v.end(), 0);
  if (sum + (10 * (s - 1)) <= t)
    cout << (t - sum) / 5 << endl;
  else
    cout << "-1" << endl;
  return 0;
}
