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