#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, r;
  int s = 0;
  int x = 10000;
  int y = 0;
  int j = 0;
  scanf("%i %i %i", &n, &m, &r);
  int a[n], b[m];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < x) {
      x = a[i];
    }
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    if (b[i] > y) {
      y = b[i];
    }
  }
  if (y < x) {
    cout << r;
    return 0;
  }
  j = r / x * y + r % x;
  cout << j;
  return 0;
}
