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