#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  long long n, m, r;
  cin >> n >> m >> r;
  int a = 2e9, b = 0;
  for (int i = 0; i < n; i++) {
    int d;
    cin >> d;
    a = min(a, d);
  }
  for (int i = 0; i < m; i++) {
    int d;
    cin >> d;
    b = max(b, d);
  }
  if (a < b) {
    r = (r % a) + (r / a) * b;
    printf("%lld\n", r);
  } else {
    printf("%lld\n", r);
  }
  return 0;
}
