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