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