#include <bits/stdc++.h>
using namespace std;
const int maxn = 30 + 5;
long long n, m, k, w;
int a[maxn];
int b[maxn];
bool cmp(int x, int y) { return x < y; }
bool cmp1(int x, int y) { return x > y; }
int main() {
  cin >> n >> m >> w;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
  }
  sort(a + 1, a + n + 1, cmp);
  sort(b + 1, b + m + 1, cmp1);
  if (a[1] < b[1]) {
    long long q = w;
    long long bb = q / a[1];
    q = q - a[1] * bb;
    q += bb * b[1];
    cout << max(w, q) << endl;
  } else
    cout << w << endl;
  return 0;
}
