#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, d, t, result, stored = 0;
  cin >> n >> d;
  for (int i = 0; i < n; i++) {
    cin >> t;
    stored += t;
  }
  d -= (n - 1) * 10;
  if (d - stored >= 0) {
    cout << (n - 1) * 2 + (d - stored) / 5;
  } else
    cout << -1;
  return 0;
}
