#include <bits/stdc++.h>
using namespace std;
int i, sum, a, b, c, d, t[1000001], n;
string s;
int main() {
  cin >> n >> d;
  for (i = 1; i <= n; i++) {
    cin >> t[i];
    sum += t[i];
  }
  if (d - sum - ((n - 1) * 10) >= 0) {
    d -= sum;
    d /= 5;
    cout << d;
  } else
    cout << "-1";
  return 0;
}
