#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  cin >> n >> m >> r;
  int min = INT_MAX, max = INT_MIN;
  for (int i = 0; i < n; i++) {
    int d;
    cin >> d;
    if (min > d) min = d;
  }
  for (int i = 0; i < m; i++) {
    int d;
    cin >> d;
    if (max < d) max = d;
  }
  int temp = r;
  int rem = r % min;
  int q = temp / min;
  int ans = rem + max * q;
  ans = ans > temp ? ans : temp;
  cout << ans << "\n";
  return 0;
}
