#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, n, m, t, N, ct, d;
  cin >> n >> d;
  int sum = 0;
  int a[n + 1];
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum + (n - 1) * 10 > d) {
    cout << "-1" << endl;
    return 0;
  }
  int rem = (d - (sum + ((n - 1) * 10))) / 5;
  int ans = (n - 1) * 2 + rem;
  cout << ans << endl;
  return 0;
}
