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