#include <bits/stdc++.h>
using namespace std;
const char newl = '\n';
const int MAX_N = 1e5 + 1;
const long long MOD = 1e9 + 7;
const long long INF = 1e9;
void setIO(string name = "") {
  cin.tie(0)->sync_with_stdio(0);
  if ((int)(name).size()) {
    freopen((name + ".in").c_str(), "r", stdin);
    freopen((name + ".out").c_str(), "w", stdout);
  }
}
bool isPrime(int x) {
  if (x < 2) {
    return false;
  }
  for (int d = 2; d * d <= x; d++) {
    if (x % d == 0) return false;
  }
  return true;
}
vector<unsigned long long int> sieve(unsigned long long int n) {
  vector<bool> prime(n + 1, true);
  prime[0] = false;
  prime[1] = false;
  int m = sqrt(n);
  for (unsigned long long int p = 2; p <= m; p++) {
    if (prime[p]) {
      for (unsigned long long int i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  vector<unsigned long long int> ans;
  for (int i = 0; i < n; i++)
    if (prime[i]) ans.push_back(i);
  return ans;
}
bool isZero(unsigned long long int i) { return i == 0; }
vector<unsigned long long int> sieveRange(unsigned long long int start,
                                          unsigned long long int end) {
  vector<unsigned long long int> s1 = sieve(start);
  vector<unsigned long long int> s2 = sieve(end);
  vector<unsigned long long int> ans(end - start);
  set_difference(s2.begin(), s2.end(), s1.begin(), s2.end(), ans.begin());
  vector<unsigned long long int>::iterator itr =
      remove_if(ans.begin(), ans.end(), isZero);
  ans.resize(itr - ans.begin());
  return ans;
}
int findpos(int arr[], int a, int n) {
  for (int i = 0; i < n; i++) {
    if (arr[i] == a) {
      return i;
    }
  }
  return -1;
}
void answer(int test) {
  int n, l;
  cin >> n >> l;
  int event = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    event = event + a;
  }
  int levent = event + (n - 1) * 10;
  if (levent > l) {
    cout << -1;
    return;
  }
  int jokes = l - event;
  jokes = jokes / 5;
  cout << jokes;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test = 1;
  int curr = 1;
  while (test--) {
    answer(curr);
    curr++;
  }
}
