#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, b, mn1 = 1000000, mn2 = 0, temp;
  cin >> n >> m >> b;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    mn1 = min(mn1, x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    mn2 = max(mn2, x);
  }
  if (mn1 < mn2) {
    temp = b / mn1;
    b -= mn1 * temp;
    b += temp * mn2;
  }
  cout << b << "\n";
}
