#include <bits/stdc++.h>
int get_least(int a[], int len) {
  int least = a[0];
  for (int i = 1; i < len; i++) {
    if (a[i] < least) least = a[i];
  }
  return least;
}
int get_max(int a[], int len) {
  int max = 0;
  for (int i = 0; i < len; i++) {
    if (a[i] > max) max = a[i];
  }
  return max;
}
int main(void) {
  int n, m, r;
  scanf("%d %d %d", &n, &m, &r);
  int buy[n];
  int sell[m];
  for (int i = 0; i < n; i++) {
    scanf("%d", &buy[i]);
  }
  int least_share_price = get_least(buy, n);
  for (int i = 0; i < m; i++) {
    scanf("%d", &sell[i]);
  }
  int max_share_price = get_max(sell, m);
  int net;
  net = (r / least_share_price) * max_share_price +
        (r - (r / least_share_price) * least_share_price);
  if (net > r) {
    printf("%d", net);
  } else {
    printf("%d", r);
  }
  return 0;
}
