#include <bits/stdc++.h>
int main() {
  int n, m, r, s[1100], b[1100], t = -1, a = 1500;
  while (scanf("%d%d%d", &n, &m, &r) != EOF) {
    for (int i = 0; i < n; i++) {
      scanf("%d", &s[i]);
      if (s[i] < a) {
        a = s[i];
        s[i] = a;
      }
    }
    int k = r / a;
    int p = r % a;
    for (int j = 0; j < m; j++) {
      scanf("%d", &b[j]);
      if (b[j] > t) {
        t = b[j];
        b[j] = t;
      }
    }
    int q = k * t + p;
    if (q >= r)
      printf("%d\n", q);
    else
      printf("%d\n", r);
  }
  return 0;
}
