#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  cin >> n >> d;
  vector<int> vec(n);
  int s_time = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
    s_time += vec[i];
  }
  int all = s_time + 10 * (n - 1);
  if (all > d)
    cout << "-1" << endl;
  else {
    ans = (d - s_time) / 5;
    cout << ans << endl;
  }
}
