#include <bits/stdc++.h>
using namespace std;
int indexMin(vector<int>& planks, int& n, int& k);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> planks(n);
  cout << indexMin(planks, n, k);
  return 0;
}
int indexMin(vector<int>& planks, int& n, int& k) {
  if (n == k) return 1;
  for (int i = 0; i < n; ++i) cin >> planks[i];
  stack<int> is;
  int min = numeric_limits<int>::max();
  int current = 0;
  for (int j = 0; j < k; ++j) current += planks[j];
  for (int i = k; i <= n; ++i) {
    if (current < min) {
      min = current;
      is.push(i - k + 1);
    }
    current -= planks[i - k];
    current += planks[i];
  }
  return is.top();
}
