#include <bits/stdc++.h>   using namespace std;   int main() {     int n, a;     cin >> n >> a;     int arr[n];     int sum = 0;     for (int i = 0; i < n; i++) {       cin >> arr[i];       sum += arr[i];     }     sum += (n - 1) * 10;     if (sum > a) {       cout << -1 << endl;     } else {       cout << (n - 1) * 2 + (a - sum) / 5 << endl;     }     return 0;   }   