#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, r;
  cin >> n >> m >> r;
  multiset<long long> s1, s2;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    s1.insert(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    s2.insert(x);
  }
  multiset<long long>::iterator it = s1.begin();
  long long y = *it;
  long long share = r / y;
  long long rem = r % y;
  it = s2.end();
  --it;
  if (share == 0)
    cout << r << endl;
  else {
    long long y = *it;
    long long ruble = share * y;
    if (ruble + rem < r)
      cout << r << endl;
    else
      cout << ruble + rem << endl;
  }
  return 0;
}
