#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, r;
  cin >> n >> m >> r;
  int minb = 1000, maxs = 1;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    minb = min(minb, t);
  }
  for (int i = 0; i < m; ++i) {
    int t;
    cin >> t;
    maxs = max(maxs, t);
  }
  cout << max((r / minb) * maxs + (r % minb), r);
}
