#include <bits/stdc++.h>
using namespace std;
vector<int> by;
vector<int> sl;
int main() {
  long long int a, b, c, d, m, n, ck = 0, ans, s, r;
  cin >> n >> m >> r;
  for (int i = 0; i < n; i++) {
    cin >> s;
    by.push_back(s);
  }
  sort(by.begin(), by.end());
  for (int j = 0; j < m; j++) {
    cin >> b;
    sl.push_back(b);
  }
  sort(sl.begin(), sl.end(), greater<int>());
  long long int buy = r / by[0];
  long long int rem = r % by[0];
  long long int sell = buy * sl[0];
  ans = sell + rem;
  if (ans > r) {
    cout << ans << endl;
  } else {
    cout << r << endl;
  }
  return 0;
}
