#include <bits/stdc++.h>
int main() {
  const int jokeDuration = 5;
  const int singerRest = 10;
  int n = 0;
  int d = 0;
  int t = 0;
  int totalT = 0;
  scanf("%d%d", &n, &d);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    totalT += t;
  }
  if (n > 1) {
    printf("%d\n", ((d - totalT) / (n - 1) < singerRest)
                       ? -1
                       : ((d - totalT) / jokeDuration));
  } else {
    printf("%d\n", (totalT > d) ? -1 : (d - totalT) / jokeDuration);
  }
  return 0;
}
