#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-7;
const long long inf = 1e12 + 1;
const long long INF = 1e18 + 1;
const int mod = 1e9 + 7;
const int N = 5e5 + 7;
int n, m, r;
int a[N], b[N];
int mn = mod, mx;
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> r;
  for (int i = (1); i <= (n); ++i) {
    cin >> a[i];
    mn = min(mn, a[i]);
  }
  for (int i = (1); i <= (m); ++i) {
    cin >> b[i];
    mx = max(mx, b[i]);
  }
  if (mn >= mx) {
    cout << r;
    exit(0);
  }
  int ans = r / mn;
  cout << (ans * mx) + (r % mn);
  exit(0);
}
