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