#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int min_v = INT_MAX;
  int max_v = 0;
  for (int i = 0; i < n; i++) {
    int u;
    cin >> u;
    min_v = min(min_v, u);
  }
  for (int i = 0; i < m; i++) {
    int u;
    cin >> u;
    max_v = max(max_v, u);
  }
  int ans = r / min_v;
  ans = ans * max_v;
  ans = ans + r % min_v;
  ans = max(ans, r);
  cout << ans;
  return 0;
}
