#include <bits/stdc++.h>
using namespace std;
long long int s, t, c, x, finally;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> s >> t;
  for (int i = 0; i < s; ++i) {
    cin >> x;
    c += x;
  }
  if ((c + 10 * (s - 1)) > t)
    cout << -1;
  else {
    finally += (t - (c + 10 * (s - 1))) / 5;
    finally += (s - 1) * 2;
    cout << finally;
  }
  return 0;
}
