#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, x, Min = 1 << 30, Max = -1 << 30;
  cin >> n >> m >> r;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    Min = min(Min, x);
  }
  for (int i = 0; i < m; ++i) {
    cin >> x;
    Max = max(Max, x);
  }
  int amount = 0, remaining = 0;
  if (Min < Max) {
    amount = (r / Min);
    remaining = r - (amount * Min);
    amount = amount * Max + remaining;
    cout << amount << endl;
  } else {
    cout << r << endl;
  }
  return 0;
}
