#include <bits/stdc++.h>
using namespace std;
int Mn, Mx;
int n, m, r, x;
int main() {
  cin >> n >> m >> r;
  Mn = 2147483600;
  Mx = 0;
  for (register int i = 1; i <= n; ++i) {
    cin >> x;
    Mn = min(Mn, x);
  }
  for (register int i = 1; i <= m; ++i) {
    cin >> x;
    Mx = max(Mx, x);
  }
  int tt = r / Mn;
  int ans = Mx * tt;
  cout << max(r, ans + r % Mn) << endl;
  return 0;
}
