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