#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int r;
  cin >> r;
  vector<int> a(n), b(m);
  for (auto &i : a) cin >> i;
  for (auto &i : b) cin >> i;
  int mn = 1e9;
  for (auto &i : a) mn = min(mn, i);
  int mx = 0;
  for (auto &i : b) mx = max(mx, i);
  if (mx >= mn)
    return cout << r % mn + (r / mn) * mx, 0;
  else
    cout << r;
  return 0;
}
