#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int mn = 1001, mx = 0;
  for (int i = 0; i < n; i++) {
    int s;
    cin >> s;
    if (s < mn) mn = s;
  }
  for (int i = 0; i < m; i++) {
    int s;
    cin >> s;
    if (s > mx) mx = s;
  }
  cout << (mn > mx ? r : r % mn + (r / mn) * mx);
  return 0;
}
