#include <bits/stdc++.h>
using namespace std;
int s[1005];
int b[1005];
int main(int argc, char *argv[]) {
  int n, m, r;
  cin >> n >> m >> r;
  for (int i = 0; i < n; ++i) {
    cin >> s[i];
  }
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  sort(s, s + n, less<int>());
  sort(b, b + m, greater<int>());
  int len = min(n, m);
  for (int i = 0; i < len; ++i) {
    if (s[i] < b[i] && r >= s[i]) {
      cout << r / s[i] * b[i] + r % s[i] << endl;
      return 0;
    }
  }
  cout << r << endl;
  return 0;
}
