#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int mi = 1000;
  int ma = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    mi = min(mi, a);
  }
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    ma = max(ma, a);
  }
  if (mi >= ma) {
    cout << r;
    return 0;
  }
  int a = r / mi;
  r %= mi;
  r += a * ma;
  cout << r;
}
