#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, d;
  while (cin >> n >> d) {
    long long sum = 0, cnt = 0, x;
    for (int i = 0; i < n; i++) {
      cin >> x;
      sum += x;
    }
    sum += (10 * (n - 1));
    cnt += ((n - 1) * 2);
    if (sum < d)
      cnt += ((d - sum) / 5);
    else if (sum > d)
      cnt = (-1);
    cout << cnt << endl;
  }
  return 0;
}
