#include <bits/stdc++.h>
using namespace std;
int maxp(int a, int b) { return max(a, b); }
int main() {
  int n, m, r, l, i;
  i = 1 + 2;
  cin >> n >> m >> r;
  int a[n], b[m];
  for (l = 0; l < n; l++) cin >> a[l];
  for (l = 0; l < m; l++) cin >> b[l];
  sort(a, a + n);
  sort(b, b + m);
  cout << maxp(r, b[m - 1] * (r / a[0]) + r % a[0]) << endl;
}
