#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int s[n], b[m];
  int div = 0, temp = 0;
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
  }
  sort(s, s + n);
  sort(b, b + m, greater<int>());
  if (s[0] >= b[0]) {
    cout << r << endl;
    return 0;
  }
  div = r / s[0];
  temp = r % s[0];
  ans = (div * b[0]) + temp;
  cout << ans << endl;
}
