#include <bits/stdc++.h>
using namespace std;
const int maxn = 55;
int n, m, r;
int a, s = 100000, b = 0;
int main() {
  cin >> n >> m >> r;
  for (int i = 1; i <= n; i++) {
    cin >> a;
    s = min(s, a);
  }
  for (int i = 1; i <= m; i++) {
    cin >> a;
    if (a > b) b = a;
  }
  cout << max(r, (r % s + b * (r / s))) << endl;
}
