#include <bits/stdc++.h>
using namespace std;
int a[2010], b[2010];
long long dp[2010][2010], pre[2010], svz[2010];
int n, m, k;
inline int Max(int a, int b) { return a > b ? a : b; }
inline long long Min(long long a, long long b) { return a > b ? b : a; }
inline void read(int &sum) {
  char ch = getchar();
  int tf = 0;
  sum = 0;
  while ((ch < '0' || ch > '9') && (ch != '-')) ch = getchar();
  tf = ((ch == '-') && (ch = getchar()));
  while (ch >= '0' && ch <= '9') sum = sum * 10 + (ch - 48), ch = getchar();
  (tf) && (sum = -sum);
}
int main() {
  read(n);
  read(m);
  register long long ii = 1, j;
  for (; ii <= n; ++ii) {
    read(a[ii]);
    pre[ii] = pre[ii - 1] + a[ii];
  }
  for (ii = 1; ii <= m; ++ii) {
    read(b[ii]);
    svz[ii] = svz[ii - 1] + b[ii];
  }
  for (ii = 1; ii <= m; ++ii) {
    for (j = ii; j <= m; ++j) {
      j != ii ? dp[j][ii] = Min(dp[j - 1][ii], svz[j] - svz[j - ii])
              : dp[j][ii] = svz[j];
    }
  }
  read(k);
  register int s = 0, p;
  for (ii = 1; ii <= n; ++ii) {
    p = m;
    for (j = ii; j <= n; ++j) {
      while (1) {
        if (dp[m][p] * (pre[j] - pre[ii - 1]) <= k) {
          s = Max(s, (j - ii + 1) * p);
          break;
        } else {
          p--;
          if (p == 0) break;
        }
      }
      if (!p) break;
    }
  }
  printf("%d\n", s);
}
