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