#include <bits/stdc++.h>
using namespace std;
long double bay = 3.14159265359;
int main() {
  int n, t, a, b = 0, c, d;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> a;
    b += a;
  }
  c = b;
  b += (10 * (n - 1));
  if (b > t)
    cout << -1;
  else {
    if ((t - c) < 5)
      cout << 0;
    else
      cout << (t - c) / 5;
  }
}
