#include <bits/stdc++.h>
using namespace std;
int n, m, r, s[50], b[50], ans, val, smin, bmax;
int main() {
  int i;
  cin >> n >> m >> r;
  for (i = 1; i <= n; i++) cin >> s[i];
  for (i = 1; i <= m; i++) cin >> b[i];
  smin = s[1];
  for (i = 2; i <= n; i++)
    if (smin > s[i]) smin = s[i];
  bmax = b[1];
  for (i = 2; i <= m; i++)
    if (bmax < b[i]) bmax = b[i];
  ans = r;
  val = r % smin + (r / smin) * bmax;
  ans = max(ans, val);
  cout << ans;
  return 0;
}
