#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int MAX = 100005;
const int MAX1 = 1005;
const int MAX2 = 105;
const int LEN = 105;
const int BASE = 1000000000;
const double EPS = 1e-7;
const int MOD = 1000000007;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ifstream in("");
  ofstream out("");
  clock_t begin = clock();
  int n, m, r;
  cin >> n >> m >> r;
  int mn = 1005, mx = 0;
  for (int i = (0); i < (n); ++i) {
    int tmp;
    cin >> tmp;
    mn = min(tmp, mn);
  }
  for (int i = (0); i < (m); ++i) {
    int tmp;
    cin >> tmp;
    mx = max(tmp, mx);
  }
  if (mx < mn) {
    cout << r << '\n';
    return 0;
  }
  int left = r % mn;
  cout << left + (r / mn) * mx << '\n';
  clock_t end = clock();
  double esecs = double(end - begin) / CLOCKS_PER_SEC;
  return 0;
}
