#include <bits/stdc++.h>
using namespace std;
int n, m, i, s, b, x, r;
void setup() {}
void solve() {
  cin >> n >> m >> r;
  s = 1e9;
  for (int i = 1; i <= n; ++i) cin >> x, s = min(s, x);
  for (int i = 1; i <= m; ++i) cin >> x, b = max(b, x);
  cout << max(r, r % s + r / s * b);
}
int main() {
  setup();
  solve();
  return 0;
}
