#include <bits/stdc++.h>
const double esp = 1e-6;
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
const int inf = 1e9;
using namespace std;
int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, m, r;
int main() {
  n = read();
  m = read();
  r = read();
  int maxx = 1e9;
  int x;
  int ans = 0;
  int price;
  for (int i = 0; i < n; i++) {
    x = read();
    maxx = min(x, maxx);
  }
  int num = -1;
  for (int i = 0; i < m; i++) {
    x = read();
    if (x < maxx) continue;
    num = max(num, x);
  }
  if (~num) {
    ans = (r - (r / maxx) * maxx) + (r / maxx) * num;
    cout << ans << endl;
  } else
    cout << r << endl;
  return 0;
}
