#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  scanf("%d %d %d", &n, &m, &r);
  int mina = 0x3f3f3f3;
  for (int i = 1; i <= n; i++) {
    int a;
    scanf("%d", &a);
    if (a < mina) mina = a;
  }
  int maxb = 0;
  for (int i = 1; i <= m; i++) {
    int b;
    scanf("%d", &b);
    if (b > maxb) maxb = b;
  }
  if (maxb < mina) {
    printf("%d", r);
    return 0;
  }
  int t = r / mina;
  r -= t * mina;
  r += t * maxb;
  printf("%d\n", r);
  return 0;
}
