output_description: Print the maximum possible score.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N K
      a_1 a_2 ... a_N
attempt: import sys
  
  input = sys.stdin.readline
  sys.setrecursionlimit(10**7)
  
  import numpy as np
  
  # どこかの長さKは最後に単色で残る
  # そこを残すと決めると他は自由に設定できる
  
  N, K = map(int, input().split())
  A = np.array(input().split(), dtype=np.int64)
  
  Acum = A.cumsum()
  range_sum = Acum[K - 1 :] - Acum[: N - (K - 1)] + A[: N - (K - 1)]
  
  # 各地点を左端として、長さKの区間の合計を求める
  Acum = A.cumsum()
  range_sum = Acum[K - 1 :] - Acum[: N - (K - 1)] + A[: N - (K - 1)]
  best = np.maximum(A, 0)
  best_cum = best.cumsum()
  best_range_sum = best_cum[K - 1 :] - best_cum[: N - (K - 1)] + best[: N - (K - 1)]
  
  min_loss = (best_range_sum - np.maximum(range_sum, 0)).min()
  
  answer = best.sum() - min_loss
  print(answer)
  
problem_description: Statement
  
  There are N squares aligned in a row. The i-th square from the left contains
  an integer a_i.
  
  Initially, all the squares are white. Snuke will perform the following
  operation some number of times:
  
    * Select K consecutive squares. Then, paint all of them white, or paint all of them black. Here, the colors of the squares are overwritten.
  
  After Snuke finishes performing the operation, the score will be calculated as
  the sum of the integers contained in the black squares. Find the maximum
  possible score.
samples: [{"input": "5 3\n    -10 10 -10 10 -10", "output": "10\n    \n\nPaint the following squares black: the second, third and fourth squares from\nthe left.\n\n* * *"}, {"input": "4 2\n    10 -10 -10 10", "output": "20\n    \n\nOne possible way to obtain the maximum score is as follows:\n\n  * Paint the following squares black: the first and second squares from the left.\n  * Paint the following squares black: the third and fourth squares from the left.\n  * Paint the following squares white: the second and third squares from the left.\n\n* * *"}, {"input": "1 1\n    -10", "output": "0\n    \n\n* * *"}, {"input": "10 5\n    5 -4 -5 -8 -4 7 2 -4 0 7", "output": "17"}]