#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000 * 1000;
int mor[MAX];
int eve[MAX];
int main() {
  int n, m, r;
  int min = 10001;
  int max = -1;
  cin >> n >> m >> r;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < min) min = a;
  }
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    if (a > max) max = a;
  }
  if (min >= max) {
    cout << r;
    return 0;
  }
  int t = r / min;
  r = r - (t * min) + (t * max);
  cout << r;
}
