#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int s[n], b[m], mi = INT_MAX, ma = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    mi = min(s[i], mi);
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    ma = max(b[i], ma);
  }
  cout << max(r, (r / mi) * ma + r % mi);
}
