#include<bits/stdc++.h>
using namespace std;
int main(){
int n,d,td = 0,sng; cin >> n >> d;
vector<int> t(n);
for(int i=0;i<n;i++){
cin >> t[i];
td += t[i];
}
sng = td;
td += (n-1)*10;
if(td > d) cout << "-1";
else cout << (d - sng)/5;
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCl7CglpbnQgbixkLHRkID0gMCxzbmc7CWNpbiA+PiBuID4+IGQ7Cgl2ZWN0b3I8aW50PiB0KG4pOwoJZm9yKGludCBpPTA7aTxuO2krKyl7CgkJY2luID4+IHRbaV07CgkJdGQgKz0gdFtpXTsKCX0JCglzbmcgPSB0ZDsKCXRkICs9IChuLTEpKjEwOwoJaWYodGQgPiBkKQljb3V0IDw8ICItMSI7CgllbHNlCWNvdXQgPDwgKGQgLSBzbmcpLzU7CglyZXR1cm4gMDsKfQ==