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