#include <bits/stdc++.h>
using namespace std;
int n, i, m, r, Max, x, idx, cur, cnt;
int a[100001];
int main() {
  cin >> n >> m >> r;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= m; i++) {
    cin >> x;
    Max = max(Max, x);
  }
  sort(a + 1, a + n + 1);
  idx = 1;
  while (idx <= n && r && a[idx] < Max) {
    cur = r / a[idx];
    cnt += cur;
    r -= cur * a[idx];
    while (a[idx] == a[idx + 1]) idx++;
    idx++;
    if (!cur) break;
  }
  cout << r + cnt * Max;
  return 0;
}
