#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, k, e, g, h, i, j, f;
  while (cin >> a >> b >> c) {
    for (d = 1; d <= a; d++) {
      cin >> e;
      if (d == 1) {
        f = e;
      } else {
        if (e < f) {
          f = e;
        }
      }
    }
    for (d = 1; d <= b; d++) {
      cin >> e;
      if (d == 1) {
        g = e;
      } else {
        if (e > g) {
          g = e;
        }
      }
    }
    if (g <= f) {
      cout << c << endl;
      continue;
    }
    h = (double)c / f;
    j = c - (h * f);
    i = h * g;
    cout << i + j << endl;
  }
  return 0;
}
