text: #!/bin/python3
  
  import math
  import os
  import random
  import re
  import sys
  
  # Complete the birthday function below.
  def birthday(s, d, m):
      count = 0
      tempSum = 0
      for i in range(0, m):
          tempSum += s[i]
      if tempSum == d:
          count += 1
      for i in range(m, len(s)):
          tempSum += s[i]
          tempSum -= s[i-m]
          if tempSum == d:
              count += 1
      return count
  
  if __name__ == '__main__':
      fptr = open(os.environ['OUTPUT_PATH'], 'w')
  
      n = int(input().strip())
  
      s = list(map(int, input().rstrip().split()))
  
      dm = input().rstrip().split()
  
      d = int(dm[0])
  
      m = int(dm[1])
  
      result = birthday(s, d, m)
  
      fptr.write(str(result) + '\n')
  
      fptr.close()
  