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