text: #include <bits/stdc++.h>
  using namespace std;
  
  #define endl '\n'
  
  int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
  
    int n;
    cin >> n;
  
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
  
    int d, m;
    cin >> d >> m;
  
    int ans = 0;
    for (int i = 0; i <= n - m; i++) {
      int sum = 0;
      for (int j = i; j < i + m; j++) sum += a[j];
  
      if (sum == d) ans++;
    }
  
    cout << ans << endl;
  
    return 0;
  }
  
  