#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[100], b[100], i, n, m, r;
  cin >> n >> m >> r;
  long long ans = r;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (i = 0; i < m; ++i) {
    cin >> b[i];
  }
  long long minn = *min_element(a, a + n);
  long long akcia = r / minn;
  r %= minn;
  r += akcia * (*max_element(b, b + m));
  cout << max(ans, r) << endl;
  return 0;
}
