#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long min(long long a, long long b) { return a + b - max(a, b); }
long long mulmod(long long a, long long b, long long mod) {
  return ((a % 998244353) * (b % 998244353) % 998244353);
}
long long mod(long long a, long long b) {
  if (a > b)
    return a - b;
  else
    return b - a;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long spf[5000005];
long long MAXN = 5000003;
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i <= MAXN; i++) spf[i] = i;
  for (long long i = 4; i <= MAXN; i += 2) spf[i] = 2;
  for (long long i = 3; i * i <= MAXN; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j <= MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
long long get(long long x) {
  long long ctr = 0;
  while (x != 1) {
    x = x / spf[x];
    ctr++;
  }
  return ctr;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m, st;
  cin >> n >> m >> st;
  vector<long long> vec(n), vec1(m);
  for (long long i = 0; i < n; i++) cin >> vec[i];
  for (long long i = 0; i < m; i++) cin >> vec1[i];
  sort(vec.begin(), vec.end());
  sort(vec1.begin(), vec1.end());
  cout << max(st, st + (st / vec[0]) * (vec1[m - 1] - vec[0]));
}
