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