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