#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  scanf("%d%d%d", &n, &m, &r);
  int MINP = 0x7fffffff;
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    MINP = min(MINP, t);
  }
  int MAXP = 0;
  for (int i = 0; i < m; ++i) {
    int t;
    scanf("%d", &t);
    MAXP = max(MAXP, t);
  }
  if (MAXP >= MINP)
    printf("%d", (MAXP - MINP) * int(r / MINP) + r);
  else
    printf("%d", r);
}
