#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, count, sum, a;
  cin >> n >> m;
  cin >> a;
  sum = a;
  count = a;
  for (int i = 1; i < n; i++) {
    cin >> a;
    sum += a;
    count += a + 10;
  }
  if (count <= m) {
    m -= sum;
    m /= 5;
    cout << m << endl;
  } else
    cout << -1 << endl;
  return 0;
}
