#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long x = 0;
bool vis[100010] = {false};
vector<int> adj[100010];
long long pow(long long a, long long b, long long m) {
  stack<int> k;
  int j = 128;
  int l = 1;
  int an = 1;
  while (b) {
    if (b >= j) {
      k.push(j);
      b -= j;
    }
    j /= 2;
  }
  while (!k.empty()) {
    if (k.top() == l) {
      an = (an * a) % mod;
      k.pop();
    }
    a = (a * a) % mod;
    l *= 2;
  }
  return an;
}
long long gcd(long a, long b) {
  return b == 0 ? (a < 0 ? -a : a) : gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  int ma = 0, mi = 10000;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    if (t < mi) {
      mi = t;
    }
  }
  for (int i = 0; i < m; ++i) {
    int t;
    cin >> t;
    if (t > ma) {
      ma = t;
    }
  }
  if (ma > mi) {
    int j = k / mi;
    k -= (j)*mi;
    k += j * ma;
  }
  cout << k << endl;
  return 0;
}
