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