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