#include <bits/stdc++.h>
int main() {
  int n, m, r;
  int a[1000], b[1000];
  int min = 0, max = 0;
  scanf("%d%d%d", &n, &m, &r);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (i == 0)
      min = a[0];
    else {
      if (a[i] < min) min = a[i];
    }
  }
  max = 0;
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
    if (b[i] > max) max = b[i];
  }
  if (r / min * max + r % min < r)
    printf("%d\n", r);
  else
    printf("%d\n", r / min * max + r % min);
  return 0;
}
