#include <bits/stdc++.h>
using namespace std;
int main() {
  int sum = 0, n, k, x;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &x), k -= x;
  (k - (n - 1) * 10 >= 0) ? printf("%d", k / 5) : printf("-1");
  return 0;
}
