#include <bits/stdc++.h>
int main(void) {
  int n, m, r, min_s = 99999, max_b = 0, rem, temp;
  scanf("%d %d %d", &n, &m, &r);
  int s[n], b[m];
  temp = r;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &s[i]);
    if (s[i] < min_s) min_s = s[i];
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", &b[i]);
    if (b[i] > max_b) max_b = b[i];
  }
  temp -= (r / min_s) * min_s;
  rem = ((r / min_s) * max_b) + temp;
  if (rem > r)
    printf("%d", rem);
  else
    printf("%d", r);
  return 0;
}
