#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, r;
  cin >> n >> m >> r;
  vector<int> vec1;
  vector<int> vec2;
  for (int i = 0; i < n; i++) {
    int val;
    cin >> val;
    vec1.push_back(val);
  }
  sort(vec1.begin(), vec1.end());
  for (int i = 0; i < m; i++) {
    int val;
    cin >> val;
    vec2.push_back(val);
  }
  sort(vec2.begin(), vec2.end(), greater<int>());
  if (vec1[0] > vec2[0]) {
    cout << r << endl;
  } else {
    int share = r / vec1[0];
    r = r % vec1[0];
    int add = share * vec2[0];
    r += add;
    cout << r;
  }
  return 0;
}
