#include <bits/stdc++.h>
using namespace std;
int Rand(int x) { return rand() * rand() % x + 1; }
const int INF = 0x3f3f3f3f, N = 1000005, M = 2000005, MOD = 1e9 + 7;
int a[N], b[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  int kk = k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m);
  int cot = k / a[1];
  k %= a[1];
  cout << max(kk, cot * b[m] + k) << endl;
  return 0;
}
