#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int t[n], tab[m];
  for (int i = 0; i < n; i++) cin >> t[i];
  for (int i = 0; i < m; i++) cin >> tab[i];
  sort(t, t + n);
  sort(tab, tab + m);
  int p = 0, k = m - 1, wyn = 0;
  if (tab[k] - t[p] > 0 && r >= t[p]) {
    wyn += (r / t[p]) * tab[k];
    r = r % t[p];
  }
  cout << wyn + r;
}
