
// #pragma GCC optmize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) (int)x.size()

typedef long long ll;
typedef long double ld;

template <typename T>
void sort(T &s) {
    sort(all(s));
}

template<typename T>
void rsort(T &s) {
    sort(rall(s));
}

const int inf = 2e9 + 2000;
const ll infll = 2e18 + 2000;
const int R = (1 << 20);
mt19937 rnd(26);

template <typename T>
struct point {
    T x, y;
    point(T x, T y) : x(x), y(y) {}
    point(point a, point b) : x(b.x - a.x), y(b.y - a.y) {}

    point operator + (point &o) const {
        return {x + o.x, y + o.y};
    }

    point operator * (const T k) const {
        return {x * k, y * k};
    }

    T operator * (const point &o) const {
        return x * o.x + y * o.y;
    }

    T operator % (const point &o) const {
        return x * o.y - y * o.x;
    }

    T len2() {
        return x * x + y * y;
    }

    ld len() {
        return sqrt(x * x + y * y);
    }
};


void solve2() {
    ll n, m, t;
    cin >> n >> m >> t;

    vector<ll> a(n);
    for (auto &i : a) {
        cin >> i;
    }
    vector<int> b(m);
    for (auto &i : b) {
        cin >> i;
    }

    cout << t / *min_element(all(a));
}


void solve() {
    ll n, m, t;
    cin >> n >> m >> t;

    vector<ll> a(n);
    for (auto &i : a) {
        cin >> i;
    }
    vector<int> b(m);
    for (auto &i : b) {
        cin >> i;
    }

    vector<ll> mps = {0};
    for (int i = 0; i < n; ++i) {
        mps.push_back(a[i] + mps.back());
    }

    vector<pair<int, int> > st;
    vector<ll> rp(n), lp(n);
    vector<int> nr(n), nl(n);
    for (int i = n - 1; i >= 0; --i) {
        while (!st.empty() && st.back().first > a[i]) {
            st.pop_back();
        }
        ll aj, id;
        if (st.empty()) {
            rp[i] = infll;
            nr[i] = -1;
        } else {
            aj = st.back().first;
            id = st.back().second;
            nr[i] = id;
            ll tt = ceil(a[i] * ((id - i) * aj - (mps[id] - mps[i])) / ld(aj - a[i]));
            if (tt % a[i] != 0) {
                ll ko = tt / a[i];
                tt = (ko + 1) * a[i];
            }
            rp[i] = tt;
        }
        st.emplace_back(a[i], i);
    }
    st.clear();

    for (int i = 0; i < n; ++i) {
        while (!st.empty() && st.back().first > a[i]) {
            st.pop_back();
        }
        ll aj, id;
        if (st.empty()) {
            lp[i] = infll;
            nl[i] = -1;
        } else {
            aj = st.back().first;
            id = st.back().second;
            nl[i] = id;
            ll tt = ceil(a[i] * ((i - id) * aj - (mps[i + 1] - mps[id + 1])) / ld(aj - a[i]));
            if (tt % a[i] != 0) {
                ll ko = tt / a[i];
                tt = (ko + 1) * a[i];
            }
            lp[i] = tt;
        }
        st.emplace_back(a[i], i);
    }

    vector<ll> res(n, -infll);
    for (int i = 0; i < n; ++i) {
        int uk = i;
        ll tt = t;
        ll r1 = 0;
        while (rp[uk] <= tt) {
            r1 += nr[uk] - uk;
            tt -= (mps[nr[uk]] - mps[uk]);
            uk = nr[uk];
        }

        r1 += tt / a[uk];

        uk = i;
        tt = t;
        ll r2 = 0;
        while (lp[uk] <= tt) {
            r2 += uk - nl[uk];
            tt -= mps[uk + 1] - mps[nl[uk] + 1];
            uk = nl[uk];
        }
        r2 += tt / a[uk];
        res[i] = max(r1, r2);
    }

    ll ans = -infll;
    for (auto i : b) {
        ans = max(ans, res[i - 1]);
    }

    cout << ans;
}


signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int tt = 1;
    // cin >> tt;

    while (tt--) {
        solve2();
    }
}
