#include <bits/stdc++.h>
using namespace std;
int buy[31], sell[31], money;
int main() {
  int n, m, piece;
  cin >> n >> m >> money;
  for (int i = 1; i <= n; i++) {
    cin >> buy[i];
  }
  sort(buy + 1, buy + n + 1);
  for (int i = 1; i <= m; i++) {
    cin >> sell[i];
  }
  sort(sell + 1, sell + m + 1);
  if (buy[1] > money || sell[m] <= buy[1]) {
    cout << money << endl;
  } else {
    piece = money / buy[1];
    money -= piece * buy[1], money += piece * sell[m];
    cout << money << endl;
  }
}
