output_description: Print the number of subsequences that satisfy the condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
      A_1 A_2 \cdots A_N
attempt: n, m = map(int, input().split())
  s = input()[::-1]
  ans = []
  now = 0
  while n > m - 1:
      x = s[now + 1 : now + m + 1][::-1]
      x = m - x.find("0")
      if x < 0:
          print(-1)
          quit()
      n -= x
      now += x
      ans.append(x)
  if n > 0:
      ans.append(n)
  print(*ans[::-1])
  
problem_description: Statement
  
  Given are a sequence of N positive integers A_1, A_2, \ldots, A_N, and a
  positive integer K.
  
  Find the number of non-empty contiguous subsequences in A such that the
  remainder when dividing the sum of its elements by K is equal to the number of
  its elements. We consider two subsequences different if they are taken from
  different positions, even if they are equal sequences.
samples: [{"input": "5 4\n    1 4 2 3 5", "output": "4\n    \n\nFour sequences satisfy the condition: (1), (4,2), (1,4,2), and (5).\n\n* * *"}, {"input": "8 4\n    4 2 4 2 4 2 4 2", "output": "7\n    \n\n(4,2) is counted four times, and (2,4) is counted three times.\n\n* * *"}, {"input": "10 7\n    14 15 92 65 35 89 79 32 38 46", "output": "8"}]