#include <bits/stdc++.h>
using namespace std;
const int N = (int)(1e4 + 20);
const int L = 16384;
const long long int M = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  int n, d;
  cin >> n >> d;
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    sum += t;
  }
  if (sum + (n - 1) * 10 > d) {
    cout << -1;
  } else {
    cout << (d - sum) / 5;
  }
  return 0;
}
