#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int s, b, n, m, r, rez, min = 1001, max = 0;
  cin >> n >> m >> r;
  for (int i = 1; i <= n; i++) {
    cin >> s;
    if (s < min) min = s;
  }
  for (int i = 1; i <= m; i++) {
    cin >> b;
    if (b > max) max = b;
  }
  rez = r;
  if (min < max) rez = r / min * max + r % min;
  cout << rez;
  return 0;
}
