#include <bits/stdc++.h>
using namespace std;
int d, n, a[103], sum = 0;
int main() {
  cin >> n >> d;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sum += ((n - 1) * 10);
  if (sum > d)
    cout << -1;
  else {
    int res = 2 * n - 2;
    res += ((d - sum) / 5);
    cout << res;
  }
  cout << endl;
  return 0;
}
