#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, f, g, h, i, j, k;
  cin >> a >> b;
  c = a - 1;
  c = c * 10;
  f = 0;
  for (d = 0; d < a; d++) {
    cin >> e;
    f = f + e;
  }
  if ((f + c) > b) {
    cout << "-1";
  } else {
    g = c / 5;
    h = c + f;
    i = b - h;
    j = i / 5;
    k = g + j;
    cout << k;
  }
  return 0;
}
