#include <bits/stdc++.h>
using namespace std;
int main() {
  int num, min, mn = 0;
  cin >> num >> min;
  int *arr = new int[num];
  int sum = 0;
  for (int i = 0; i < num; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  mn += 2 * (num - 1);
  if ((mn * 5 + sum) > min) {
    cout << "-1";
    return 0;
  }
  while ((mn * 5 + sum) <= min) {
    mn++;
  }
  mn--;
  cout << mn;
  return 0;
}
