#include <bits/stdc++.h>
using namespace std;
int i, j, m, n, k, ii, ans, b, t, d, sum;
int main() {
  scanf("%d %d", &n, &d);
  d -= 10 * (n - 1);
  for (i = 1; i <= n; i++) {
    scanf("%d", &t);
    d -= t;
  }
  if (d < 0)
    printf("-1\n");
  else if (d < 5)
    printf("%d\n", 2 * (n - 1));
  else
    printf("%d\n", 2 * (n - 1) + d / 5);
  return 0;
}
