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