#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r, s, d, b, i, t, l;
  cin >> n >> m >> r;
  b = 1e9;
  for (i = 0; i < n; i++) {
    cin >> s;
    b = min(s, b);
  }
  d = 0;
  for (i = 0; i < m; i++) {
    cin >> s;
    d = max(s, d);
  }
  s = r / b;
  l = r - s * b;
  t = l + s * d;
  cout << max(r, t);
  return 0;
}
