#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  long long r;
  cin >> r;
  long long mm = INT_MAX;
  long long mk = INT_MIN;
  for (long long i = 0; i < n; i++) {
    long long l;
    cin >> l;
    mm = min(mm, l);
  }
  for (long long i = 0; i < m; i++) {
    long long l;
    cin >> l;
    mk = max(mk, l);
  }
  long long ans = max(r, ((r / mm) * (mk - mm)) + ((r / mm) * mm) + (r % mm));
  cout << ans << '\n';
}
int32_t main(void) {
  ios_base ::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
