#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, div, mod, sum;
  int arrs[1005], arrb[1005];
  scanf("%d%d%d", &n, &m, &r);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arrs[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &arrb[i]);
  }
  sort(arrs, arrs + n);
  sort(arrb, arrb + m);
  div = r / arrs[0];
  mod = r % arrs[0];
  sum = (div * arrb[m - 1]) + mod;
  if (sum > r)
    printf("%d\n", sum);
  else
    printf("%d\n", r);
}
