#include <bits/stdc++.h>
using namespace std;
int main() {
  int numOfSongs, duration;
  cin >> numOfSongs >> duration;
  vector<int> song;
  song.resize(numOfSongs);
  int songsTime = 0;
  for (int i = 0; i < numOfSongs; i++) {
    cin >> song[i];
    songsTime += song[i];
  }
  songsTime += (song.size() - 1) * 10;
  if (songsTime <= duration)
    cout << numOfSongs * 2 - 2 + ((duration - songsTime) / 5) << endl;
  else
    cout << "-1";
  return 0;
}
