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