#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  int a;
  int count;
  vector<int> v;
  int sum;
  for (int i = 0; i < n; i++) {
    cin >> a;
    sum += a;
    v.push_back(a);
  }
  if (((n - 1) * 10) > t)
    cout << -1 << endl;
  else {
    if (((n - 1) * 10 + sum) > t)
      cout << -1 << endl;
    else {
      t -= (n - 1) * 10 + sum;
      count = (n - 1) * 2;
      count += t / 5;
      cout << count << endl;
    }
  }
  return 0;
}
