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