#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, i, p, sum = 0, m;
  cin >> n >> d;
  for (i = 0; i < n; i++) {
    cin >> p;
    sum += p;
  }
  m = (n - 1) * 10 + sum;
  if (m > d) {
    cout << "-1";
    return 0;
  }
  cout << (n - 1) * 2 + (d - m) / 5;
  return 0;
}
