#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, a[100], sum = 0, k, s;
  cin >> n >> d;
  for (int j = 0; j < n; j++) {
    cin >> a[j];
    sum += a[j];
  }
  sum = sum + (n - 1) * 10;
  if (sum > d) {
    cout << -1;
  }
  if (sum <= d) {
    s = d - sum;
    cout << (n - 1) * 2 + (s / 5);
  }
}
