#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, r;
  cin >> n >> m >> r;
  vector<int> a(n), b(m);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  if (b[m - 1] > a[0]) {
    r = r % a[0] + r / a[0] * (b[m - 1]);
  }
  cout << r << endl;
  return 0;
}
