#include <bits/stdc++.h>
using namespace std;
const int limit = 1005;
int n, m, r;
int a[limit];
int b[limit];
int mina, maxb;
int sol;
int main() {
  cin >> n >> m >> r;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) cin >> b[i];
  mina = a[1];
  for (int i = 2; i <= n; i++) mina = min(mina, a[i]);
  maxb = b[1];
  for (int i = 2; i <= m; i++) maxb = max(maxb, b[i]);
  if (mina < maxb) {
    int amount = r / mina;
    sol = r % mina + amount * maxb;
  } else
    sol = r;
  cout << sol << endl;
}
