#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <math.h>
#include <string>
#include <vector>
#include <chrono>
#include <random>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <assert.h>
#include <set>
#define endl '\n'

using namespace std;
using i64 = long long;
using ld = long double;

const i64 INF = 1e18 + 5;

mt19937 rnd(29);

i64 gcd_ext(i64 a, i64 b, i64& x, i64& y) {
	if (b == 0) {
		x = 1; y = 0;
		return a;
	}
	i64 x1 = 0, y1 = 0;
	i64 c = gcd_ext(b, a % b, x1, y1);
	x = y1, y = (-y1 * (a / b) + x1);
	return c;
}

i64 gcd(i64 a, i64 b) {
	while (b) swap(b, a %= b);
	return a;
}

const i64 S = 3e5 + 10;
i64 a[S], b[S], a1[S];

struct line {
	i64 k, b;
	line() {
		k = 0, b = INF;
	}
	line(i64 k1, i64 b1) {
		k = k1, b = b1;
	}
	i64 val(i64 x) {
		return x * k + b;
	}
};

struct segTree {
	vector <line> tr;
	segTree() {
		tr.resize(4 * S);
	}
	void clear() {
		tr.clear();
		tr.resize(4 * S);
	}
	void update(i64 v, i64 l, i64 r, i64 ql, i64 qr, line x) {
		if (l >= qr || r <= ql) return;
		if (l >= ql && r <= qr) {
			line y = tr[v];
			if (y.val(l) <= x.val(l) && y.val(r - 1) <= x.val(r - 1)) {
				return;
			}
			if (y.val(l) >= x.val(l) && y.val(r - 1) >= x.val(r - 1)) {
				tr[v] = x;
				return;
			}
			i64 m = (l + r) / 2;

			if (y.val(l) <= x.val(l) && y.val(m) <= x.val(m)) {
				update(2 * v + 2, m, r, ql, qr, x);
				return;
			}
			else {
				tr[v] = x;
				update(2 * v + 1, l, m, ql, qr, y);
				return;
			}
		}
		i64 m = (l + r) / 2;
		update(2 * v + 1, l, m, ql, qr, x), update(2 * v + 2, m, r, ql, qr, x);
		return;
	}
	i64 getMin(i64 v, i64 l, i64 r, i64 ql) {
		if (l + 1 == r) {
			return tr[v].val(ql);
		}
		i64 m = (l + r) / 2;
		if (ql >= m) {
			return min(tr[v].val(ql), getMin(2 * v + 2, m, r, ql));
		}
		else {
			return min(tr[v].val(ql), getMin(2 * v + 1, l, m, ql));
		}
	}
};

segTree tr;

i64 pref[S], rePref[S], ex[S];

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	i64 n, m, t; cin >> n >> m >> t;

	for (i64 x = 0; x < n; ++x) {
		cin >> a[x];
		a1[x] = a[x];
		pref[x] = a[x];
		if (x > 0) pref[x] += pref[x - 1];
	}

	reverse(a1, a1 + n);

	for (i64 x = 0; x < n; ++x) {
		rePref[x] = a1[x];
		if (x > 0) {
			rePref[x] += rePref[x - 1];
		}
	}

	for (i64 x = 0; x < m; ++x) {
		cin >> b[x];
		--b[x];
		ex[b[x]] = 1;
	}

	i64 l = 0, r = 1e9 + 5;

	while (r - l > 1) {
		i64 m = (l + r) / 2;
		bool ok = false;
		for (i64 x = 0; x < n; ++x) {
			i64 val = tr.getMin(0, 0, n, x) + pref[x];
			if (val <= t && ex[x]) {
				ok = true;
				break;
			}
			line d = line(-a[x], -pref[x] + (m + x) * a[x]);
			tr.update(0, 0, n, x + 1, min(x + m, n), d);
		}
		tr.clear();
		for (i64 x = 0; x < n; ++x) {
			i64 val = tr.getMin(0, 0, n, x) + rePref[x];
			if (val <= t && ex[n - x - 1]) {
				ok = true;
				break;
			}
			line d = line(-a1[x], -rePref[x] + (m + x) * a1[x]);
			tr.update(0, 0, n, x + 1, min(x + m, n), d);
		}
		tr.clear();
		if (ok) l = m;
		else r = m;
	}

	i64 ans = l;

	for (i64 x = 0; x < n; ++x) {
		if ((t / a[x]) > ans && ex[x]) ans = t / a[x];
	}

	cout << ans;
}