#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int s[2000], b[2000];
  int n, m, r;
  cin >> n >> m >> r;
  for (int i = 0; i < n; i++) scanf("%d", &s[i]);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  sort(s, s + n);
  sort(b, b + m);
  if (s[0] < b[m - 1]) {
    int x = r / s[0];
    r -= x * s[0];
    r += x * b[m - 1];
  }
  cout << r;
}
