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