#include <bits/stdc++.h>
int main() {
  int jokes = 0, songs, time, la, tmp = 0;
  std::cin >> songs >> time;
  for (int i = 0; i < songs; i++) {
    std::cin >> la;
    tmp += la;
  }
  if (tmp + 10 * (songs - 1) > time)
    jokes = -1;
  else {
    jokes = 2 * (songs - 1);
    time -= (tmp + 10 * (songs - 1));
    jokes += time / 5;
  }
  std::cout << jokes;
  return 0;
}
