#include <bits/stdc++.h>
using namespace std;
int main() {
  int song;
  int lim;
  int plus;
  int joketime = 0;
  int total = 0;
  cin >> song >> lim;
  int itime[100];
  joketime = (song - 1) * 2;
  for (int i = 0; i < song; i++) cin >> itime[i];
  for (int i = 0; i < song; i++) total += itime[i];
  total = total + (song - 1) * 10;
  if (total > lim)
    cout << "-1" << endl;
  else {
    plus = (lim - total) / 5;
    joketime += plus;
    cout << joketime << endl;
  }
}
