#include <bits/stdc++.h>
using namespace std;
int n, m, r;
const int N = 30;
int buy[30];
int sell[30];
int main(int argc, char const *argv[]) {
  cin >> n >> m >> r;
  for (int i = 0; i < n; ++i) {
    cin >> buy[i];
  }
  for (int i = 0; i < m; ++i) {
    cin >> sell[i];
  }
  sort(buy, buy + n);
  sort(sell, sell + m);
  int numshares = r / buy[0];
  int diff = sell[m - 1] - buy[0];
  int ans = 0;
  if (diff > 0) {
    ans = r + diff * numshares;
  } else {
    ans = r;
  }
  cout << ans << endl;
  return 0;
}
