#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int s[n];
  int b[m];
  int min = 1000, max = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] < min) {
      min = s[i];
    }
  }
  int c = r / min;
  int d = c * min;
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    if (b[i] > max) {
      max = b[i];
    }
  }
  int e = r - d;
  int f = c * max;
  int g = e + f;
  if (g < r)
    cout << r << endl;
  else
    cout << g << endl;
  return 0;
}
