#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, min_buy, max_sell, sell, profit, d;
  cin >> n >> m >> r;
  int a[n], b[m];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + m);
  min_buy = a[0];
  max_sell = b[m - 1];
  sell = r / min_buy;
  d = r % min_buy;
  if (min_buy >= max_sell) {
    cout << r << endl;
    return 0;
  } else {
    profit = (sell * max_sell) + d;
  }
  cout << profit << endl;
  return 0;
}
