#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, s, d, f, g, h, j, k, l;
  cin >> a >> s;
  d = 0;
  h = 0;
  for (f = 1; f <= a; f++) {
    cin >> g;
    d = d + g;
    if (f != a) {
      d = d + 10;
      h = h + 2;
    }
  }
  if (d > s)
    cout << -1 << endl;
  else {
    f = s - d;
    f = f / 5;
    h = h + f;
    cout << h << endl;
  }
}
