#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, r, i, j, cnt, temp;
  scanf("%lld %lld %lld", &n, &m, &r);
  long long a[n];
  long long b[m];
  for (i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  for (i = 0; i < m; i++) {
    scanf("%lld", &b[i]);
  }
  sort(a, a + n);
  sort(b, b + m);
  temp = r;
  cnt = r / a[0];
  r -= (cnt * a[0]);
  r += (cnt * b[m - 1]);
  printf("%lld\n", max(temp, r));
  return 0;
}
