#include <bits/stdc++.h>
using namespace std;
int a[1000000];
int main() {
  int i, j, k, l, n, m;
  cin >> n >> k;
  cin >> a[1];
  m = 100000000;
  l = a[0] = 0;
  if (k == 1 && a[1] < m) m = a[1], l = 1;
  for (i = 2; i <= n; i++) {
    cin >> a[i];
    a[i] += a[i - 1];
    if (i >= k && a[i] - a[i - k] < m) l = i - k + 1, m = a[i] - a[i - k];
  }
  cout << l << endl;
  return 0;
}
