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