#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int arr[102];
  for (int i = 0; i < a; i++) {
    cin >> arr[i];
  }
  int out = 0;
  for (int i = 0; i < a; i++) {
    b -= arr[i];
    b -= 10;
    out += 2;
  }
  out -= 2;
  b += 10;
  if (b < 0) {
    cout << -1;
  } else if (b == 0) {
    cout << out;
  } else {
    out += floor(b / 5.0);
    cout << out;
  }
  return 0;
}
