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