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