#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  vector<int> s(n);
  int max = -1e9;
  int min = 1e9;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] < min) min = s[i];
  }
  vector<int> b(m);
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    if (b[i] > max) max = b[i];
  }
  if (max > min) {
    int q = r / min;
    int remainder = r % min;
    cout << (q * max) + remainder << endl;
  } else
    cout << r << endl;
  return 0;
}
