#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int i, j, k;
  int a[n], b[m];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (j = 0; j < m; j++) cin >> b[j];
  sort(a, a + n);
  sort(b, b + m);
  int x = a[0];
  int y = b[m - 1];
  int t = (r / x) * y + r % x;
  if (t > r)
    cout << t << endl;
  else
    cout << r << endl;
  return 0;
}
