#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, total = 0, jokes, brtime;
  cin >> n >> d;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    total += temp;
  }
  brtime = (n - 1) * 10;
  if (brtime + total > d) {
    cout << -1;
    return 0;
  } else {
    jokes = (d - total) / 5;
    cout << jokes;
  }
  return 0;
}
