#include <bits/stdc++.h>
using namespace std;
long long int arr[31];
long long int brr[31];
int main() {
  long long int n, m, r, i;
  cin >> n >> m >> r;
  for (i = 1; i <= n; i++) cin >> arr[i];
  sort(arr + 1, arr + n + 1);
  for (i = 1; i <= m; i++) cin >> brr[i];
  sort(brr + 1, brr + 1 + m, greater<int>());
  if (arr[1] >= brr[1]) {
    cout << r << endl;
    return 0;
  }
  long long int val = (r / arr[1]) * (brr[1]) + r % arr[1];
  cout << val << endl;
}
