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