#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  vector<int> a(n);
  vector<int> b(m);
  int min1 = INT_MAX;
  int max1 = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    min1 = min(min1, a[i]);
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    max1 = max(max1, b[i]);
  }
  if (min1 >= max1)
    cout << r;
  else
    cout << (r / min1) * max1 + r % min1 << endl;
}
