#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, i, j, p, tot;
  cin >> n >> m >> r;
  int arr[n + 7], brr[m + 7];
  for (i = 0; i < n; i++) cin >> arr[i];
  for (i = 0; i < m; i++) cin >> brr[i];
  sort(arr, arr + n);
  sort(brr, brr + m, greater<int>());
  p = r / arr[0];
  tot = max(r - (p * arr[0]) + (p * brr[0]), r);
  cout << tot << endl;
  return 0;
}
