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