#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ret = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  do {
    ret = ret * 10 + c - '0';
    c = getchar();
  } while ('0' <= c && c <= '9');
  return ret;
}
int n, m;
long long x;
int a[2020], b[2020];
long long suma[2020], sumb[2020];
long long mina[2020], minb[2020];
struct dat {
  int x, y, sum;
  bool operator<(const dat& a) const { return sum > a.sum; }
} q[2020 * 2020];
int cnt = 0;
int main() {
  n = read(), m = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    suma[i] = suma[i - 1] + a[i];
  }
  for (int i = 1; i <= m; i++) {
    b[i] = read();
    sumb[i] = sumb[i - 1] + b[i];
  }
  for (int i = 1; i <= n; i++) mina[i] = (1 << 30);
  for (int i = 1; i <= m; i++) minb[i] = (1 << 30);
  for (int d = 1; d <= n; d++) {
    for (int i = d; i <= n; i++) mina[d] = min(mina[d], suma[i] - suma[i - d]);
  }
  for (int d = 1; d <= m; d++) {
    for (int i = d; i <= m; i++) minb[d] = min(minb[d], sumb[i] - sumb[i - d]);
  }
  x = read();
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      q[++cnt].x = i, q[cnt].y = j, q[cnt].sum = i * j;
  sort(q + 1, q + cnt + 1);
  for (int i = 1; i <= cnt; i++)
    if (1LL * mina[q[i].x] * minb[q[i].y] <= x) {
      printf("%d\n", q[i].sum);
      return 0;
    }
  printf("0\n");
  return 0;
}
