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