#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    int r;
    scanf("%d", &r);
    int y = -1, x = 100001, xx;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &xx);
      x = min(x, xx);
    }
    for (int i = 1; i <= m; i++) {
      scanf("%d", &xx);
      y = max(y, xx);
    }
    if (y > x)
      printf("%d\n", r / x * y + r % x);
    else
      printf("%d\n", r);
  }
  return 0;
}
