#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5) + 5;
const int INF = int(1e9) + 7;
const long long MINF = 1e18;
int a[N], b[N];
void solve() {
  int n, m, r;
  cin >> n >> m >> r;
  int mini = INF;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mini = min(mini, a[i]);
  }
  int maxi = -INF;
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
    maxi = max(maxi, b[i]);
  }
  if (mini <= maxi) {
    cout << r / mini * maxi + (r % mini);
  } else {
    cout << r;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int TT = 1;
  while (TT--) {
    solve();
  }
  return 0;
}
