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