#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, x, y;
  cin >> n >> m >> r;
  cin >> x;
  for (int i = 1; i < n; i++) {
    cin >> y;
    x = min(x, y);
  }
  int save = r % x;
  int share = r / x;
  cin >> x;
  for (int i = 1; i < m; i++) {
    cin >> y;
    x = max(x, y);
  }
  cout << max(r, (save + (share * x)));
}
