#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N, T, K; cin >> N >> T; vector t(N - 1); for (int i = 0; i < N - 1; i++) cin >> t[i]; cin >> K; vector clocks(K); for (int i = 0; i < K; i++) { cin >> clocks[i]; clocks[i]--; } sort(clocks.begin(), clocks.end()); priority_queue, greater> pq; int timeLeft = T, clocksUsed = 0, clockIndex = 0; for (int i = 0; i < N - 1; i++) { timeLeft -= t[i]; while (timeLeft < 0 && !pq.empty()) { timeLeft += pq.top(); pq.pop(); clocksUsed++; } if (timeLeft < 0) { cout << "-1\n"; return 0; } while (clockIndex < K && clocks[clockIndex] == i) { pq.push(10); clockIndex++; } } if (timeLeft == 0 && !pq.empty()) { timeLeft += pq.top(); pq.pop(); clocksUsed++; } if (timeLeft <= 0) { cout << "-1\n"; } else { cout << clocksUsed << "\n"; } return 0; }