#include <bits/stdc++.h>
using namespace std;
int N, M, S, Min = 2140000000, Max, X, P;
int main() {
  cin >> N >> M >> S;
  P = S;
  for (int i = 1; i <= N; i++) {
    cin >> X;
    Min = min(Min, X);
  }
  for (int i = 1; i <= M; i++) {
    cin >> X;
    Max = max(Max, X);
  }
  int aux = S / Min;
  S -= aux * Min;
  S += aux * Max;
  cout << max(P, S);
  return 0;
}
