#include <bits/stdc++.h>
using namespace std;
void c_p_c() {}
void vector_sort(vector<int> &v) { sort(v.begin(), v.end()); }
void vector_display(vector<int> &v) {
  for (auto x : v) cout << x << " ";
}
void vector_insert(vector<int> &v, int n) {
  for (int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    v.push_back(x);
  }
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) {
  int x, y;
  return (a * b) / gcd(a, b);
}
bool isPrime(long long int n) {
  if (n == 1) return false;
  for (long long int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void prime_seive(int *p, int n) {
  for (int i = 3; i <= n; i += 2) {
    p[i] = 1;
  }
  for (long long i = 3; i <= n; i += 2) {
    if (p[i] == 1) {
      for (long long j = i * i; j <= n; j = j + i) p[j] = 0;
    }
  }
  p[2] = 1;
  p[1] = p[0] = 0;
}
long long int fastExpo(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long int ans;
  if (b % 2 == 0) {
    long long int temp = fastExpo(a, b / 2);
    ans = temp * temp;
  } else {
    long long int temp = fastExpo(a, (b - 1) / 2);
    ans = a * temp * temp;
  }
  return ans;
}
long long int count_digits(long long int x) {
  long long int digits = 0;
  while (x) {
    digits++;
    x = x / 10;
  }
  return digits;
}
void solution() {
  int n, m, r;
  cin >> n >> m >> r;
  int arr[n], brr[m];
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < m; i++) cin >> brr[i];
  int Min = *min_element(arr, arr + n);
  int Max = *max_element(brr, brr + m);
  if (Min >= Max)
    cout << r << endl;
  else {
    cout << (r % Min + (r / Min) * Max) << endl;
  }
}
int32_t main() {
  c_p_c();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  solution();
  return 0;
}
