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