#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  ;
  long long n, t, a, b, x, y, q, z;
  string s;
  while (cin >> n >> q) {
    vector<long long> v;
    for (int i = (0); i < (n); i++) {
      cin >> x;
      v.push_back(x);
    }
    int c = 0;
    for (int i = (0); i < (n - 1); i++) {
      q -= v[i] + 10, c += 2;
    }
    q -= v[n - 1];
    if (q < 0)
      cout << -1 << endl;
    else {
      if (q == 0)
        cout << c << endl;
      else {
        c += q / 5;
        cout << c << endl;
      }
    }
  }
  return 0;
}
