#include <bits/stdc++.h>
using namespace std;
int n, d, x, ans, sum;
int main() {
  cin >> n >> d;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (i == 0)
      sum += x;
    else {
      sum += x + 10;
      ans += 2;
    }
  }
  if (sum > d)
    cout << -1 << endl;
  else
    cout << ans + (d - sum) / 5 << endl;
  return 0;
}
