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