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