#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, i;
  cin >> n >> m >> r;
  int buy[n];
  int sell[m];
  for (i = 0; i < n; i++) {
    cin >> buy[i];
  }
  for (i = 0; i < m; i++) {
    cin >> sell[i];
  }
  int mini = buy[0];
  for (i = 0; i < n; i++) {
    if (buy[i] < mini) {
      mini = buy[i];
    }
  }
  int maxi = sell[0];
  for (i = 0; i < m; i++) {
    if (maxi < sell[i]) maxi = sell[i];
  }
  int purchased = r / mini;
  if (maxi < mini) {
    cout << r;
    return 0;
  } else {
    cout << r - (mini * purchased) + (maxi * purchased);
  }
}
