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