#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, c = 1, mn = 1e9, mx = 0;
  cin >> a >> b >> c;
  int ar[a + 5], ar1[b + 5];
  for (int i = 0; i < a; ++i) {
    cin >> ar[i];
    mn = min(mn, ar[i]);
  }
  for (int i = 0; i < b; ++i) {
    cin >> ar1[i];
    mx = max(mx, ar1[i]);
  }
  if (mn >= mx) {
    cout << c;
    return;
  }
  int k = c / mn, l = k * mx;
  cout << l + (c % mn);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(0);
  int t = 1;
  while (t--) {
    solve();
    cout << '\n';
  }
  cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
}
