#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

struct Tree
{
    int a,b;
};

int cmp(const void *x,const void *y)
{
    return ((*(struct Tree *)x).a-(*(struct Tree *)y).a);
}

int MyMin(int a,int b)
{
    return (a<b?a:b);
}

int main()
{
    int n,v;
    while(scanf("%d%d",&n,&v)!=EOF)
    {
        int i,ans,maxday;
        int can[3005];
        struct Tree t[3005];
        maxday=0;
        memset(can,0,sizeof(can));
        for(i=1;i<=n;i++)
        {
            scanf("%d%d",&t[i].a,&t[i].b);
            if(t[i].a>maxday)
            {
                maxday=t[i].a;
            }
        }
        qsort(t+1,n,sizeof(t[1]),cmp);
        ans=0;
        for(i=1;i<=n;i++)
        {
            can[t[i].a]+=t[i].b;
        }
        for(i=maxday;i>=1;i--)
        {
            if(can[i+1]<v)
            {
                if(v-can[i+1]>can[i])
                {
                    can[i+1]+=can[i];
                    can[i]=0;
                }
                else
                {
                    can[i]=can[i]-(v-can[i+1]);
                    can[i+1]=v;
                }
            }
        }
        for(i=1;i<=maxday+1;i++)
        {
            /*printf("%d\n",can[i]);*/
            ans+=MyMin(can[i],v);
        }
        printf("%d\n",ans);
    }
    return (0);
}


#include<stdio.h>
int main()
{
    int n,v;
    scanf("%d %d",&n,&v);
    int i,arr[3005]={0};
    for(i=0;i<n;++i)
    {
        int a,b;
        scanf("%d %d",&a,&b);
        arr[a]+=b;
    }
    int ans=0;
    if(arr[0]>0)
    {
        if(arr[0]<v)
        {
            ans=arr[0];
            arr[0]=0;
        }
        else
        {
            ans=v;
            arr[0]-=v;
        }
    }
   // printf("%d\n",ans);
    for(i=1;i<3005;++i)
    {
        int day=0;
        if(arr[i-1]>0)
        {
            if(arr[i-1]<v)
            {
                day+=arr[i-1];
                arr[i-1]=0;
            }
            else
            {
                day=v;
                arr[i-1]=0;
            }
        }
        if(arr[i]>0)
        {
            if((arr[i]+day)<v)
            {
                day+=arr[i];
                arr[i]=0;
            }
            else
            {
                arr[i]=arr[i]-(v-day);
                day=v;
                //arr[i]-=v;
            }
        }
        ans+=day;
         //if(day!=0)
        // printf("%d %d\n",day,i);
    }
    printf("%d",ans);
    return 0;
}


#include<stdio.h>
struct x
{
	int first;
	int last;
}a[3010];
int main()
{
	int v,n,b,c,sum=0,i;
	for(i=0;i<3010;i++)
	{
		a[i].first=0;
		a[i].last=0;
	}
	scanf("%d %d",&n,&v);
	for(i=0;i<n;i++)
	{
		scanf("%d %d",&b,&c);
		a[b].first=a[b].first+c;
	}
	for(i=1;i<3010;i++)
	{
		if(a[i].last>=v)
		{
			sum=sum+v;
			a[i].last-=v;
			a[i+1].last=a[i+1].last+a[i].first;
		}
		else
		{
			if(a[i].first>=v-a[i].last)
			{
				sum=sum+v;
				a[i+1].last=a[i+1].last+a[i].first+a[i].last-v;
			}
			else
			{
				sum=sum+a[i].last+a[i].first;
			}
		}
	}
	printf("%d",sum);
}


#include <stdio.h>
#include <string.h>
#include <stdbool.h>

#define MAX 100010
#define min(a,b) ((a)<(b)?(a):(b))
#define clr(ar) memset(ar, 0, sizeof(ar))
#define read() freopen("lol.txt", "r", stdin)

bool visited[3010][3010];
int m, v, ar[3010], dp[3010][3010];

int main(){
    int i, j, x, y;

    while (scanf("%d %d", &m, &v) != EOF){
        clr(ar);
        while (m--){
            scanf("%d %d", &x, &y);
            ar[x] += y;
        }

        int res = 0, l = 0;
        for (i = 1; i < 3010; i++){
            if (l){
                if (v <= l){
                    res += v;
                    l = ar[i];
                }
                else{
                    int r = v - l;
                    res += l;
                    res += min(r, ar[i]);
                    l = ar[i] - min(r, ar[i]);
                }
            }
            else{
                res += min(v, ar[i]);
                l = ar[i] - min(v, ar[i]);
            }
        }

        printf("%d\n", res);
    }
    return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>

int cmp(const void *a , const void *b)
{
	return *(int *)a - *(int *)b;
}

int max(int a,int b)
{
	if(a<b)
		return b;
	return a;
}

int min(int a,int b)
{
	if(a>b)
		return b;
	return a;
}
int mod(int a)
{
	if(a<0)
		return -a;
	return a;
}

int main()
{
	int n,v,i,a,b,t[10000]={0},count[10000]={0};
	scanf("%d%d",&n,&v);
	int ans=0;
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&a,&b);
		if(b+count[a]<=v)
		{
			count[a]+=b;
		}
		else
		{
			if(count[a]>v)
				count[a]=v;

			if(b>=(v-count[a]))
			{
				b-=(v-count[a]);
				count[a]=v;
				count[a+1]+=b;
			}
			else
			{
				count[a]+=b;
			}

		}

	}
	for(i=1;i<=3000;i++)
	{
		if(count[i]>v)
			ans+=v;
		else
			ans+=count[i];
	}
	printf("%d\n",ans );
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>

int cmp(const void *a , const void *b)
{
	return *(int *)a - *(int *)b;
}

int max(int a,int b)
{
	if(a<b)
		return b;
	return a;
}

int min(int a,int b)
{
	if(a>b)
		return b;
	return a;
}
int mod(int a)
{
	if(a<0)
		return -a;
	return a;
}

int main()
{
	int n,v,i,a,b,t[10000]={0},count[10000]={0};
	scanf("%d%d",&n,&v);
	int ans=0;
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&a,&b);
		count[a]+=b;
	}
	for(i=0;i<=3000;i++)
	{
		if(t[i]+count[i]>v)
		{
			if(t[i]>=v)
			{
				ans+=v;
				t[i+1]+=count[i];
			}
			else
			{

				if(count[i]>v-t[i])
				{
					count[i]-=(v-t[i]);
					t[i+1]+=count[i];
					ans+=v;
				}
				else
				{
					ans+=t[i]+count[i];
				}
			}
		}
		else
		{
			ans+=t[i]+count[i];

		}
	}
	printf("%d\n",ans );
	return 0;
}


import java.util.Arrays;
import java.util.Scanner;

public class B462 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int k=sc.nextInt();

int a[]=new int[n];
int b[]=new int[n-k+1];

for (int i = 0; i < n; i++) {
	a[i]=sc.nextInt();
}
	int initial=0;
for (int i = 0; i < k; i++) {
	initial+=a[i];
}
b[0]=initial;
for (int i = 1; i < b.length; i++) {
	b[i]=initial-a[i-1]+a[i+k-1];
	initial=b[i];
}
	int min=101;
	int minIndex=0;

	for (int i = 0; i < b.length; i++) {
		if(b[i]<min){
			min=b[i];
			minIndex=i;
		}

	}
	System.out.println(minIndex+1);
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class B462 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int k=sc.nextInt();

int a[]=new int[n];
int b[]=new int[n-k+1];

for (int i = 0; i < n; i++) {
	a[i]=sc.nextInt();
}
	int initial=0;
for (int i = 0; i < k; i++) {
	initial+=a[i];
}
b[0]=initial;
for (int i = 1; i < b.length; i++) {
	b[i]=initial-a[i-1]+a[i+k-1];
	initial=b[i];
}
	int min=Integer.MAX_VALUE;
	int minIndex=0;

	for (int i = 0; i < b.length; i++) {
		if(b[i]<min){
			min=b[i];
			minIndex=i;
		}

	}
	System.out.println(minIndex+1);
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class B462 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int k=sc.nextInt();

int a[]=new int[n];
long b[]=new long[n-k+1];

for (int i = 0; i < n; i++) {
	a[i]=sc.nextInt();
}
	long initial=0;
for (int i = 0; i < k; i++) {
	initial+=a[i];
}
b[0]=initial;
for (int i = 1; i < b.length; i++) {
	b[i]=initial-a[i-1]+a[i+k-1];
	initial=b[i];
}
	long min=101;
	int minIndex=0;

	for (int i = 0; i < b.length; i++) {
		if(b[i]<min){
			min=b[i];
			minIndex=i;
		}

	}
	System.out.println(minIndex+1);
	}

}


import com.sun.corba.se.spi.orb.ParserImplBase;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: AUtemuratov
 * Date: 07.04.14
 * Time: 15:43
 * To change this template use File | Settings | File Templates.
 */
public class Main {
    static FastReader fr = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter pw = new PrintWriter(System.out);
    static int n,k,cnt,min=Integer.MAX_VALUE,index=-1;
    static int a[] = new int[1111111];
    public static void main(String[] args) throws Exception {

        n = fr.nextInt();
        k = fr.nextInt();

        for (int i=1; i<=n; i++) {
            a[i] = fr.nextInt();
        }

        for (int i=1; i<k; i++) {
            cnt+=a[i];
        }

        for (int i=k; i<=n; i++) {
            cnt-=a[i-k];
            cnt+=a[i];
            if (cnt<min) {
                min = cnt;
                index = i-k+1;
            }
        }

        pw.println(index);
        pw.close();
    }

}

class Pair implements Comparable<Pair> {
    int l,r;
    public Pair(int l, int r) {
        this.l = l;
        this.r = r;
    }

    @Override
    public int compareTo(Pair p) {
        if (p.l<l) {
            return 1;
        } else if (p.l==l) {
            return 0;
        } else {
            return -1;
        }
    }
}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public int nextLong() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public int nextDouble() throws Exception {
        return Integer.parseInt(nextToken());
    }
}


import com.sun.corba.se.spi.orb.ParserImplBase;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: AUtemuratov
 * Date: 07.04.14
 * Time: 15:43
 * To change this template use File | Settings | File Templates.
 */
public class Main {
    static FastReader fr = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter pw = new PrintWriter(System.out);
    static int n,k,cnt,min=Integer.MAX_VALUE,index=-1;
    static int a[] = new int[1111111];
    public static void main(String[] args) throws Exception {

        n = fr.nextInt();
        k = fr.nextInt();

        for (int i=1; i<=n; i++) {
            a[i] = fr.nextInt();
        }

        for (int i=1; i<=k; i++) {
            cnt+=a[i];
        }

        for (int i=k+1; i<=n; i++) {
            if (cnt<min) {
                min = cnt;
                index = i-1;
            }
                cnt+=a[i];
                cnt-=a[i-k];
        }

        //pw.println(min);
        pw.println(Math.max(index-k+1,1));
        pw.close();
    }

}

class Pair implements Comparable<Pair> {
    int l,r;
    public Pair(int l, int r) {
        this.l = l;
        this.r = r;
    }

    @Override
    public int compareTo(Pair p) {
        if (p.l<l) {
            return 1;
        } else if (p.l==l) {
            return 0;
        } else {
            return -1;
        }
    }
}

class FastReader {

    BufferedReader bf;
    StringTokenizer tk = null;
    String DELIM = " ";

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }

    public String nextToken() throws Exception {

        if(tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine(),DELIM);
        }
        return tk.nextToken();
    }

    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public int nextLong() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public int nextDouble() throws Exception {
        return Integer.parseInt(nextToken());
    }
}


import java.io.*;
import java.util.*;
import java.lang.StringBuilder;

public class Solution363B {

	public static void main(String[] args) {

        //Scanner sc = new Scanner(System.in);
        MyScanner sc = new MyScanner();
        int n = sc.nextInt();
        int k = sc.nextInt();

        int[] fences = new int[n];
        int minSum = Integer.MAX_VALUE;
        int tmpMin = 0;
        int index = 0;

        for (int i = 0 ; i < n ; i++) {
            int tmp = sc.nextInt();

            fences[i] = tmp;

            if(i < k-1) {
                tmpMin += tmp;

            } else if(i == k - 1) {
                tmpMin += tmp;

                if(tmpMin < minSum) {
                    minSum = tmpMin;
                    //System.out.println(index);
                }

            } else {
                tmpMin += tmp;
                tmpMin -= fences[i-k];

                if(tmpMin < minSum) {
                    minSum = tmpMin;
                    index = i - k + 2;
                    //System.out.println(minSum + " " + index);
                }
            }

        }

        System.out.println(index);
	}

}

class MyScanner {
	BufferedReader br;
	StringTokenizer st;

    public MyScanner() {
    	br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
     	while (st == null || !st.hasMoreElements()) {
     		try {
     			st = new StringTokenizer(br.readLine());
     		} catch (IOException e) {
     			e.printStackTrace();
     		}
     	}
     	return st.nextToken();
    }

 	int nextInt() {
 		return Integer.parseInt(next());
 	}

 	long nextLong() {
 		return Long.parseLong(next());
 	}

 	double nextDouble() {
 		return Double.parseDouble(next());
 	}

 	String nextLine(){
 		String str = "";
 		try {
 			str = br.readLine();
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
 		return str;
 	}
}


import java.io.*;
import java.util.*;
import java.lang.StringBuilder;

public class Solution363B {

	public static void main(String[] args) {

        //Scanner sc = new Scanner(System.in);
        MyScanner sc = new MyScanner();
        int n = sc.nextInt();
        int k = sc.nextInt();

        int[] fences = new int[n];
        int minSum = Integer.MAX_VALUE;
        int tmpMin = 0;
        int index = 1;

        for (int i = 0 ; i < n ; i++) {
            int tmp = sc.nextInt();

            fences[i] = tmp;

            if(i < k-1) {
                tmpMin += tmp;

            } else if(i == k - 1) {
                tmpMin += tmp;

                if(tmpMin < minSum) {
                    minSum = tmpMin;
                    //System.out.println(index);
                }

            } else {
                tmpMin += tmp;
                tmpMin -= fences[i-k];

                if(tmpMin < minSum) {
                    minSum = tmpMin;
                    index = i - k + 2;
                    //System.out.println(minSum + " " + index);
                }
            }

        }

        System.out.println(index);
	}

}

class MyScanner {
	BufferedReader br;
	StringTokenizer st;

    public MyScanner() {
    	br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
     	while (st == null || !st.hasMoreElements()) {
     		try {
     			st = new StringTokenizer(br.readLine());
     		} catch (IOException e) {
     			e.printStackTrace();
     		}
     	}
     	return st.nextToken();
    }

 	int nextInt() {
 		return Integer.parseInt(next());
 	}

 	long nextLong() {
 		return Long.parseLong(next());
 	}

 	double nextDouble() {
 		return Double.parseDouble(next());
 	}

 	String nextLine(){
 		String str = "";
 		try {
 			str = br.readLine();
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
 		return str;
 	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();
          int sum=0;
          for(int i=0;i<k;i++)
             sum+=a[i];
          int pos=0;int index=0;
          if(k==1)
          {
             for(int i=1;i<n;i++)
             {
                 if(a[i]<sum)
                 {

                     sum=a[i];pos=i;
                 }
             }
              System.out.println(" "+(pos+1));return;
          }
          for(int i=k;i<n;i++)
          {
              int max=sum-a[index]+a[i];
              if(max<sum){pos=index+1;sum=max;}
              index++;

          }
          System.out.println(""+(pos+1));

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
              a[i]=s.nextInt();
          int sum=0;
          for(int i=0;i<k;i++)
             sum+=a[i];
          int pos=0;int index=0;
          for(int i=k;i<n;i++)
          {
              int max=sum-a[index]+a[i];
              if(max<sum){pos=index+1;sum=max;}
              index++;

          }
          System.out.println(""+(pos+1));

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();
          int sum=0;
          for(int i=0;i<k;i++)
             sum+=a[i];
          int pos=0;int index=0;
          if(k==1)
          {
             for(int i=1;i<n;i++)
             {
                 if(a[i]<sum)
                 {

                     sum=a[i];pos=i+1;
                 }
             }
              System.out.println(" "+(pos+1));return;
          }
          for(int i=k;i<n;i++)
          {
              int max=sum-a[index]+a[i];
              if(max<sum){pos=index+1;sum=max;}
              index++;

          }
          System.out.println(""+(pos+1));

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();
          int sum=0;
          for(int i=0;i<k;i++)
             sum+=a[i];
          int pos=0;int index=0;
          if(k==1)
          {
             for(int i=1;i<n;i++)
             {
                 if(a[i]<sum){
                     sum=a[i];pos=i+1;
                 }
             }
          }
          for(int i=k;i<n;i++)
          {
              int max=sum-a[index]+a[i];
              if(max<sum){pos=index+1;sum=max;}
              index++;

          }
          System.out.println(""+(pos+1));

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();

          dp[1]=a[0];int pos=1;int max=inf;
          for(int i=2;i<n;i++)
          {
              dp[i]=dp[i-1]+a[i];
          }
          for(int i=k+1;i<n;i++)
          {
            //  System.out.println(" "+i+"  "+(i-k));
              if(dp[i]-dp[i-k-1]<max){max=inf;pos=i-k;}
          }
          System.out.println(""+pos);

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();

          dp[1]=a[0];int pos=1;int max=0;
          for(int i=0;i<k;i++)max+=a[i];
          for(int i=2;i<=n;i++)
          {
              dp[i]=dp[i-1]+a[i-1];
             // System.out.println("-> "+dp[i]);
          }
          for(int i=k+1;i<=n;i++)
          {
            //System.out.println(" "+i+"  "+(i-k)+"   "+(dp[i]-dp[i-k]));
              if(dp[i]-dp[i-k]<max){max=dp[i]-dp[i-k];pos=i-k+1;}
          }
          System.out.println(""+pos);

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();
          int sum=0;
          for(int i=0;i<k;i++)
             sum+=a[i];
          int pos=0;int index=0;
          if(k==1)
          {
              Arrays.sort(a);
              System.out.println(""+a[0]);return;
          }
          for(int i=k;i<n;i++)
          {
              int max=sum-a[index]+a[i];
              if(max<sum){pos=index+1;sum=max;}
              index++;

          }
          System.out.println(""+(pos+1));

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class practise1 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
     private static FastScanner s = new FastScanner();
     private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int count=0;
      static int inf= Integer.MAX_VALUE/2;
     public static void main(String[] args) throws IOException
     {
          int n=s.nextInt();
          int k=s.nextInt();
          int a[] = new int[n];
          int dp[] = new int[n+1];
          for(int i=0;i<n;i++)
           a[i]=s.nextInt();
          int sum=0;
          for(int i=0;i<k;i++)
             sum+=a[i];
          int pos=0;int index=0;
          if(k==1)
          {
             for(int i=1;i<n;i++)
             {
                 if(a[i]<sum)
                 {

                     sum=a[i];pos=i+1;
                 }
             }
              System.out.println(" "+(pos));return;
          }
          for(int i=k;i<n;i++)
          {
              int max=sum-a[index]+a[i];
              if(max<sum){pos=index+1;sum=max;}
              index++;

          }
          System.out.println(""+(pos+1));

         s.close();
         ww.close();
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Problem363B
{
    public static void main(String[] args) throws IOException
    {
        fastinput.init(System.in);
        int n = fastinput.nextInt();
        int k = fastinput.nextInt();
        int[] fences = new int[n];
        int minimum = 101;
        int minpos = 0;
        int[] lengths = new int[n];
        for (int i = 0; i < n; i++)
        {
            fences[i] = fastinput.nextInt();
            for (int j = i; j > i-k && j >= 0; j--)
            {
                lengths[j] = lengths[j] + fences[j];
            }

            if (i >k && lengths[i-k] < minimum)
            {
                minimum = lengths[i-k];
                minpos = i-k;
            }
        }

        System.out.println(minpos);
    }

    public static class fastinput
    {
        static BufferedReader bf;
        static StringTokenizer st;

        static void init(InputStream input)
        {
            bf = new BufferedReader(new InputStreamReader(input));
            st = new StringTokenizer("");
        }

        static String nextline() throws IOException
        {
            return bf.readLine();
        }

        static String next() throws IOException
        {
            while (!st.hasMoreTokens())
            {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }

        static int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Problem363B
{
    public static void main(String[] args) throws IOException
    {
        fastinput.init(System.in);
        int n = fastinput.nextInt();
        int k = fastinput.nextInt();
        int[] fences = new int[n];
        for (int i = 0; i < n; i++)
        {
            fences[i] = fastinput.nextInt();
        }
        int minimumindex = 0;
        int minimumsum = 550001;
        for (int i = 0; i + (k-1) < n; i++)
        {
            int localsum = fences[i]+fences[i+1]+fences[i+2];
            if (localsum < minimumsum)
            {
                minimumsum = localsum;
                minimumindex = i;
            }
        }
        System.out.println(minimumindex+1);
    }

    public static class fastinput
    {
        static BufferedReader bf;
        static StringTokenizer st;

        static void init(InputStream input)
        {
            bf = new BufferedReader(new InputStreamReader(input));
            st = new StringTokenizer("");
        }

        static String nextline() throws IOException
        {
            return bf.readLine();
        }

        static String next() throws IOException
        {
            while (!st.hasMoreTokens())
            {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }

        static int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Problem363B
{
    public static void main(String[] args) throws IOException
    {
        fastinput.init(System.in);
        int n = fastinput.nextInt();
        int k = fastinput.nextInt();
        int[] fences = new int[n];
        for (int i = 0; i < n; i++)
        {
            fences[i] = fastinput.nextInt();
        }
        int[] lengths = new int[n+1-k];
        int minimum = 0;
        int minpos = 0;
        for (int i = 0; i < lengths.length; i++)
        {
            for (int j = i; j < i+k; j++)
            {
                lengths[i] = lengths[i] + fences[j];
            }
            if (minimum == 0)
            {
                minimum = lengths[i];
                minpos = i;
            }
            else
            {
                if (lengths[i] < minimum)
                {
                    minimum = lengths[i];
                    minpos = i;
                }
            }
        }
        System.out.println(minpos+1);
    }

    public static class fastinput
    {
        static BufferedReader bf;
        static StringTokenizer st;

        static void init(InputStream input)
        {
            bf = new BufferedReader(new InputStreamReader(input));
            st = new StringTokenizer("");
        }

        static String nextline() throws IOException
        {
            return bf.readLine();
        }

        static String next() throws IOException
        {
            while (!st.hasMoreTokens())
            {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }

        static int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Problem363B
{
    public static void main(String[] args) throws IOException
    {
        fastinput.init(System.in);
        int n = fastinput.nextInt();
        int k = fastinput.nextInt();
        int[] fences = new int[n];
        for (int i = 0; i < n; i++)
        {
            fences[i] = fastinput.nextInt();
        }
        int minimumindex = 0;
        int minimumsum = 550001;
        for (int i = 0; i + (k-1) < n; i++)
        {
            int localsum = fences[i];
            int start = 1;
            while (k > start)
            {
                localsum += fences[i+start++];
            }

            if (localsum < minimumsum)
            {
                minimumsum = localsum;
                minimumindex = i;
            }
        }
        System.out.println(minimumindex+1);
    }

    public static class fastinput
    {
        static BufferedReader bf;
        static StringTokenizer st;

        static void init(InputStream input)
        {
            bf = new BufferedReader(new InputStreamReader(input));
            st = new StringTokenizer("");
        }

        static String nextline() throws IOException
        {
            return bf.readLine();
        }

        static String next() throws IOException
        {
            while (!st.hasMoreTokens())
            {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }

        static int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Problem363B
{
    public static void main(String[] args) throws IOException
    {
        fastinput.init(System.in);
        int n = fastinput.nextInt();
        int k = fastinput.nextInt();
        int[] fences = new int[n];
        for (int i = 0; i < n; i++)
        {
            fences[i] = fastinput.nextInt();
        }
        int minimumindex = 0;
        int minimumsum = 550001;
        int transfersum = 0;
        int localsum = 0;
        for (int i = 0; i + (k-1) < n; i++)
        {
            if (i == 0)
            {
                localsum = fences[i];
                int start = 1;
                while (k > start)
                {
                    localsum += fences[i+start++];
                }
            }
            else
            {
                localsum = transfersum-fences[i-1]+fences[i+(k-1)];
            }
            transfersum = localsum;
            if (localsum < minimumsum)
            {
                minimumsum = localsum;
                minimumindex = i;
            }
        }
        System.out.println(minimumindex+1);
    }

    public static class fastinput
    {
        static BufferedReader bf;
        static StringTokenizer st;

        static void init(InputStream input)
        {
            bf = new BufferedReader(new InputStreamReader(input));
            st = new StringTokenizer("");
        }

        static String nextline() throws IOException
        {
            return bf.readLine();
        }

        static String next() throws IOException
        {
            while (!st.hasMoreTokens())
            {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }

        static int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Problem363B
{
    public static void main(String[] args) throws IOException
    {
        fastinput.init(System.in);
        int n = fastinput.nextInt();
        int k = fastinput.nextInt();
        int[] fences = new int[n];
        for (int i = 0; i < n; i++)
        {
            fences[i] = fastinput.nextInt();
        }
        int minimumindex = 0;
        int minimumsum = Integer.MAX_VALUE;
        int transfersum = 0;
        int localsum = 0;
        for (int i = 0; i + (k-1) < n; i++)
        {
            if (i == 0)
            {
                localsum = fences[i];
                int start = 1;
                while (k > start)
                {
                    localsum += fences[i+start++];
                }
            }
            else
            {
                localsum = transfersum-fences[i-1]+fences[i+(k-1)];
            }
            transfersum = localsum;
            if (localsum < minimumsum)
            {
                minimumsum = localsum;
                minimumindex = i;
            }
        }
        System.out.println(minimumindex+1);
    }

    public static class fastinput
    {
        static BufferedReader bf;
        static StringTokenizer st;

        static void init(InputStream input)
        {
            bf = new BufferedReader(new InputStreamReader(input));
            st = new StringTokenizer("");
        }

        static String nextline() throws IOException
        {
            return bf.readLine();
        }

        static String next() throws IOException
        {
            while (!st.hasMoreTokens())
            {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }

        static int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
    }
}


import java.util.*;
import java.lang.Math;
public class Problem2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        int[] height = new int[n];
        for(int i=0; i<n; i++)
            height[i] = scan.nextInt();
        int min = 0;
        int ans = 1;
        for(int i=0; i<k; i++)
            min += height[i];
        int temp = 0;
        for(int i=1; i<n-k+1; i++) {
            temp -= height[i-1];
            temp += height[i+k-1];
            if(temp < min) {
                min = temp;
                ans = i+1;
            }
        }
        System.out.println(ans);
    }
}


import java.util.*;
import java.lang.Math;
public class Problem2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        int[] height = new int[n];
        for(int i=0; i<n; i++)
            height[i] = scan.nextInt();
        int min = 0;
        int ans = 1;
        for(int i=0; i<k; i++)
            min += height[i];
        int temp = min;
        for(int i=1; i<n-k+1; i++) {
            temp -= height[i-1];
            temp += height[i+k-1];
            if(temp < min) {
                min = temp;
                ans = i+1;
            }
        }
        System.out.println(ans);
    }
}


import java.util.*;
import java.lang.Math;
public class Problem2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        int[] height = new int[n];
        for(int i=0; i<n; i++)
            height[i] = scan.nextInt();
        int min = 0;
        int ans = 1;
        for(int i=0; i<k; i++)
            min += height[i];
        int temp = 0;
        for(int i=1; i<n-k+1; i++) {
            for(int j=i; j<k+i; j++)
                temp += height[j];
            if(temp < min) {
                min = temp;
                ans = i+1;
            }
            temp = 0;
        }
        System.out.println(ans);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class CF {

    static InputReader in = new InputReader(System.in);

    public static void main(String[] args) {

        int n = in.nextInt();
        int k = in.nextInt();
        int[] arr = new int[n];

        int initialIndex = 0;
        int initialSum = 0;

        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
            if (i < 3)
                initialSum += arr[i];
        }

        int tempSum = initialSum;

        for (int i = 1; i < n - k + 1; i++) {
            tempSum -= arr[i - 1];
            tempSum += arr[i + k - 1];
            if (tempSum < initialSum) {
                initialSum = tempSum;
                initialIndex = i;
            }

        }

        System.out.println(initialIndex + 1);

    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String readLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}


import java.io.IOException;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Ivan
 */
public class secondProblem {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)throws IOException {
        Scanner sc=new Scanner(System.in);
        int fences=sc.nextInt();
        int cons=sc.nextInt();
        int[] heights=new int[fences];
        for(int i=0;i<fences;i++)
            heights[i]=sc.nextInt();
        int initSum=0;
        for(int i=0;i<cons;i++)
            initSum+=heights[i];
        int minSum=initSum;
        int index=0;
        for(int i=1;i<fences-cons+1;i++){
            initSum+=heights[i+cons-1];
            initSum-=heights[i-1];
            if(minSum>initSum){
                minSum=initSum;
                index=i;
            }

        }
        System.out.println(index+1);

    }

}


import java.io.IOException;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Ivan
 */
public class secondProblem {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)throws IOException {
        Scanner sc=new Scanner(System.in);
        int fences=sc.nextInt();
        int cons=sc.nextInt();
        int[] heights=new int[fences];
        for(int i=0;i<fences;i++)
            heights[i]=sc.nextInt();
        int initSum=0;
        for(int i=0;i<cons;i++)
            initSum+=heights[i];
        int minSum=initSum;
        int index=0;
        for(int i=1;i<fences-cons+1;i++){
            initSum+=heights[i+cons-1];
            initSum-=heights[i-1];
            if(minSum>initSum){
                minSum=initSum;
                index=i+1;
            }

        }
        System.out.println(index);

    }

}


import java.util.Scanner;

public class B {
	static Scanner sc=new Scanner(System.in);

	public static void main(String[] args) {
		int n=sc.nextInt();
		int k=sc.nextInt();
		int index=0,min=Integer.MAX_VALUE;
		int []v=new int[n];
		int sum=0;
		for (int i = 0; i < n; i++){
			v[i]=sc.nextInt();
			sum+=v[i];
			if(i>=k-1){
				if (sum<=min) {
					min=sum;
					index=i-k+2;
				}
				sum-=v[i-k+1];
			}
		}
		System.out.println(index);

	}

}


import java.util.Scanner;

public class B {
	static Scanner sc=new Scanner(System.in);

	public static void main(String[] args) {
		int n=sc.nextInt();
		int k=sc.nextInt();
		int index=0,min=Integer.MAX_VALUE;
		int []v=new int[n];
		int sum=0;
		for (int i = 0; i < n; i++){
			v[i]=sc.nextInt();
			if(i+k<=n){

				sum+=v[i];
				if(i>=k-1){
					if (sum<=min) {
						min=sum;
						index=i-k+2;
					}
					sum-=v[i-k+1];
				}
			}
		}

		/*int sum=0;
		for (int i = 0; i <= n-k; i++) {
			sum=0;
			for (int j = i; j < i+k; j++)
				sum+=v[j];
			if (sum<=min) {
				min=sum;
				index=i+1;
			}
		}*/
		System.out.println(index);

	}

}


import java.util.Scanner;

public class B {
	static Scanner sc=new Scanner(System.in);

	public static void main(String[] args) {
		int n=sc.nextInt();
		int k=sc.nextInt();
		int index=0,min=Integer.MAX_VALUE;
		int []v=new int[n];
		for (int i = 0; i < n; i++)
			v[i]=sc.nextInt();
		int sum=0;
		for (int i = 0; i <= n-k; i++) {
			sum=0;
			for (int j = i; j < i+k; j++)
				sum+=v[j];
			if (sum<=min) {
				min=sum;
				index=i+1;
			}
		}
		System.out.println(index);

	}

}


import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int n = in.readInt();
		int k = in.readInt();

		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = in.readInt();
		}

		int s[] = new int[n];
		s[0] = a[0];
		for (int i = 1; i < k; i++) {
			s[i] = a[i] + s[i - 1];
		}

		for (int i = k; i < n; i++) {
			s[i] = a[i] + s[i - 1] - a[i - k];
		}
		//System.out.println(Arrays.toString(s));
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = k; i < n; i++) {
			if (min > s[i]) {
				res = i;
				min = s[i];
			}
		}
		out.print(res-k+2);

	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void close() {
		writer.close();
	}

	public void print(int i) {
		writer.print(i);
	}

	}


import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int n = in.readInt();
		int k = in.readInt();

		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = in.readInt();
		}
		if(n==k){
			out.print(1);
			return;
		}

		int s[] = new int[n];
		s[0] = a[0];
		for (int i = 1; i < k; i++) {
			s[i] = a[i] + s[i - 1];
		}

		for (int i = k; i < n; i++) {
			s[i] = a[i] + s[i - 1] - a[i - k];
		}
		//System.out.println(Arrays.toString(s));
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = k; i < n; i++) {
			if (min > s[i]) {
				res = i;
				min = s[i];
			}
		}
		out.print(res-k+2);

	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void close() {
		writer.close();
	}

	public void print(int i) {
		writer.print(i);
	}

	}


import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int n = in.readInt();
		int k = in.readInt();

		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = in.readInt();
		}
		if(n==k){
			out.print(1);
			return;
		}

		int s[] = new int[n];
		s[0] = a[0];
		for (int i = 1; i < k; i++) {
			s[i] = a[i] + s[i - 1];
		}

		for (int i = k; i < n; i++) {
			s[i] = a[i] + s[i - 1] - a[i - k];
		}
		System.out.println(Arrays.toString(s));
		int min = Integer.MAX_VALUE;
		int res = 0;
		for (int i = k-1; i < n; i++) {
			if (min > s[i]) {
				res = i;
				min = s[i];
			}
		}
		out.print(res-k+2);

	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void close() {
		writer.close();
	}

	public void print(int i) {
		writer.print(i);
	}

	}


import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int n = in.readInt();
		int k = in.readInt();

		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = in.readInt();
		}

		int res = 1 ;
		int min = Integer.MAX_VALUE;
		for(int i = 0 ; i < a.length - k + 1; i++){
			int sum = 0 ;
			for(int j = 0 ;j < k; j++){
				sum += a[i+j];
			}
			if(sum<min){
				min = sum;
				res = i+1;
			}
		}
		out.print(res);

//		if(n==k){
//			out.print(1);
//			return;
//		}
//
//
//		int s[] = new int[n];
//		s[0] = a[0];
//		for (int i = 1; i < k; i++) {
//			s[i] = a[i] + s[i - 1];
//		}
//
//
//		for (int i = k; i < n; i++) {
//			s[i] = a[i] + s[i - 1] - a[i - k];
//		}
//		System.out.println(Arrays.toString(s));
//		int min = Integer.MAX_VALUE;
//		int res = 0;
//		for (int i = k-1; i < n; i++) {
//			if (min > s[i]) {
//				res = i;
//				min = s[i];
//			}
//		}
//		out.print(res-(k-1) + 1);

	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void close() {
		writer.close();
	}

	public void print(int i) {
		writer.print(i);
	}

	}


import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		int n = in.readInt();
		int k = in.readInt();

		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = in.readInt();
		}

		int res = 1 ;
		int min = Integer.MAX_VALUE;
		int prev_sum = -1;
		for(int i = 0 ; i < a.length - k + 1; i++){
			int sum = 0 ;
			if( prev_sum >-1 ){
				sum = prev_sum + a[i+k-1] - a[i-1];
			}else{
				for(int j = 0 ;j < k; j++){
					sum += a[i+j];
				}
			}
			prev_sum = sum;
			if(sum<min){
				min = sum;
				res = i+1;
			}
		}
		out.print(res);

//		if(n==k){
//			out.print(1);
//			return;
//		}
//
//
//		int s[] = new int[n];
//		s[0] = a[0];
//		for (int i = 1; i < k; i++) {
//			s[i] = a[i] + s[i - 1];
//		}
//
//
//		for (int i = k; i < n; i++) {
//			s[i] = a[i] + s[i - 1] - a[i - k];
//		}
//		System.out.println(Arrays.toString(s));
//		int min = Integer.MAX_VALUE;
//		int res = 0;
//		for (int i = k-1; i < n; i++) {
//			if (min > s[i]) {
//				res = i;
//				min = s[i];
//			}
//		}
//		out.print(res-(k-1) + 1);

	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void close() {
		writer.close();
	}

	public void print(int i) {
		writer.print(i);
	}

	}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main{
    public static void main(String[] args) throws IOException{
        new Main().go();
    }
    StringTokenizer in;
    BufferedReader buf;
    PrintWriter out;
    void go()  throws IOException{
        buf = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.close();
        buf.close();
    }
    String nextToken() throws IOException{
        if(in == null || !in.hasMoreTokens())
            in = new StringTokenizer(buf.readLine());
        return in.nextToken();
    }
    void solve()  throws IOException{
        int n = Integer.parseInt(nextToken());
        int k = Integer.parseInt(nextToken());
        int[] a = new int[150001];
        for(int i=0;i<n;i++){
            a[i]= Integer.parseInt(nextToken());
        }
        int sum=0;
        for(int i=0;i<k;i++)sum+=a[i];
        int Min=sum,id=0;
        for(int i=k;i<n;i++){
            sum=sum + a[i] - a[i-k];
            if(Min>sum){
                Min=sum;
                id=i-k+2;
            }
        }
        out.println(id);
    }
    void solve2()  throws IOException{
        Integer a = Integer.parseInt(nextToken());

        while(!a.equals(0)){
            int b = a%10;
            print(b);
            a/=10;
        }
    }
    void print(int a) {
        if(a>5){
            out.print("-O");
            a-=5;
        }
        else
            out.print("O-");
        out.print("|");
        char[] s = "OOOOO".toCharArray();
        s[a] ='-';
        out.println(s);
    }
}
/*

*/


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main{
    public static void main(String[] args) throws IOException{
        new Main().go();
    }
    StringTokenizer in;
    BufferedReader buf;
    PrintWriter out;
    void go()  throws IOException{
        buf = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.close();
        buf.close();
    }
    String nextToken() throws IOException{
        if(in == null || !in.hasMoreTokens())
            in = new StringTokenizer(buf.readLine());
        return in.nextToken();
    }
    void solve()  throws IOException{
        int n = Integer.parseInt(nextToken());
        int k = Integer.parseInt(nextToken());
        int[] a = new int[150001];
        for(int i=0;i<n;i++){
            a[i]= Integer.parseInt(nextToken());
        }
        int sum=0;
        for(int i=0;i<k;i++)sum+=a[i];
        int Min=sum,id=0;
        for(int i=k;i<n;i++){
            sum=sum + a[i] - a[i-k];
            if(Min>sum){
                Min=sum;
                id=i-k+1;
            }
        }
        out.println(id+1);
    }

}
/*

*/


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main{
    public static void main(String[] args) throws IOException{
        new Main().go();
    }
    StringTokenizer in;
    BufferedReader buf;
    PrintWriter out;
    void go()  throws IOException{
        buf = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.close();
        buf.close();
    }
    String nextToken() throws IOException{
        if(in == null || !in.hasMoreTokens())
            in = new StringTokenizer(buf.readLine());
        return in.nextToken();
    }
    void solve()  throws IOException{
        String[] in = buf.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);
        int[] a = new int[150001];
        in = buf.readLine().split(" ");
        for(int i=0;i<n;i++){
            a[i]= Integer.parseInt(in[i]);
        }
        int sum=0;
        for(int i=0;i<k;i++)sum+=a[i];
        int Min=sum,id=0;
        for(int i=k;i<n;i++){
            sum=sum + a[i] - a[i-k];
            if(Min>sum){
                Min=sum;
                id=i-k+1;
            }
        }
        out.println(id+1);
    }

}
/*

*/


import java.util.Scanner;

public class C_211_A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int [] ar  = new int[n];
		int [] sum  = new int[n];
		for (int i = 0; i < n; i++) {
			ar[i] = sc.nextInt();
			if(i!=0)sum[i]=sum[i-1]+ar[i];
		}
		int min=sum[k-1];int ans = 0;
		for (int i = k; i < n; i++) {
			if(min> sum[i]-sum[i-k+1]){
				ans = i-k+2;
				min =sum[i]-sum[i-k+1];
			}
		}
		System.out.println(ans);
		sc.close();
		}
	}


import java.util.Scanner;

public class C_211_A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int [] ar  = new int[n];
		int [] sum  = new int[n];
		for (int i = 0; i < n; i++) {
			ar[i] = sc.nextInt();
			if(i!=0)sum[i]=sum[i-1]+ar[i];
		}
		int min=sum[k-1];int ans = 1;
		for (int i = k; i < n; i++) {
			if(min> sum[i]-sum[i-k+1]){
				ans = i-k+2;
				min =sum[i]-sum[i-k+1];
			}
		}
		System.out.println(ans);
		sc.close();
		}
	}


import java.util.Scanner;

public class C_211_A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int [] ar  = new int[n];
		int [] sum  = new int[n];

		for (int i = 0; i < n; i++) {
			ar[i] = sc.nextInt();
			if(i!=0)sum[i]=sum[i-1]+ar[i];else sum[0]=ar[0];
		}

		int min=sum[k-1];int ans = 1;
		for (int i = k; i < n; i++) {
			if(min> sum[i]-sum[i-k+1]){
				ans = i-k+2;
				min =sum[i]-sum[i-k+1];
			}
		}
		System.out.println(ans);
		sc.close();
		}
	}


import java.util.Scanner;

public class C_211_A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int [] ar  = new int[n];
		int [] sum  = new int[n+1];

		for (int i = 0; i < n; i++) {
			ar[i] = sc.nextInt();
		}
		if(k==n){
			System.out.println(1);
			return;
		}
		sum[n]=0;
		sum[n-1]=ar[n-1];
		for (int i = n-2; i>=0; i--) {
			sum[i]=sum[i+1]+ar[i];
		}

		int min = Integer.MAX_VALUE;int ans =0;
		for (int i = 0; i+k < sum.length; i++) {
			if(min > sum[i] - sum[i+k]){
				ans = i+1;
				min = sum[i] - sum[i+k];
			}
		}

		System.out.println(ans);
		sc.close();
		}
	}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int k = in.nextInt();
        int []h = new int[n + 1];
        for (int i = 1;i <= n;++i){
            h[i] = in.nextInt();
        }
        int res = Integer.MAX_VALUE;
        int val = 0;
        for (int i = 1;i <= k; ++i)
            val = h[i];
        int index = 1;
        res = val;int g = 1;
        for (int i = k + 1; i <= n; ++i){
            val = h[i] - h[g];
            if (val < res){
                res = val;
                index = g + 1;
            }
            g++;
        }
        out.print(index);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int k = in.nextInt();
        int []h = new int[n + 1];
        for (int i = 1;i <= n;++i){
            h[i] = in.nextInt();
        }
        int res = Integer.MAX_VALUE;
        int index = -1;
        for (int i = 3; i <= n; ++i){
            int val = h[i] + h[i - 1] + h[i - 2];
            if (val < res){
                res = val;
                index = i - 2;
            }
        }
        out.print(index);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int k = in.nextInt();
        int []h = new int[n + 1];
        for (int i = 1;i <= n;++i){
            h[i] = in.nextInt();
        }
        int res = Integer.MAX_VALUE;
        int val = 0;
        for (int i = 1;i <= k; ++i)
            val = h[i];
        int index = 1;
        res = val;int g = 1;
        for (int i = k + 1; i <= n; ++i){
            val += h[i] - h[g];
            if (val < res){
                res = val;
                index = g + 1;
            }
            g++;
        }
        out.print(index);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BFence {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] data = reader.readLine().split(" ");
        int[] arr = new int[Integer.parseInt(data[0])];
        int k = Integer.parseInt(data[1]);

        int min = 0;
        data = reader.readLine().split(" ");
        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(data[i]);
            if (i < k) {
                min += arr[i];
            }
        }

        int index = -1;
        int temp = min;
        for (int i = 0; i < arr.length - k; i++) {
            temp -= arr[i];
            temp += arr[i + k];
            if (temp < min) {
                min = temp;
                index = i;
            }

        }
        System.out.println(index + 2);
        reader.close();
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BFence {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] data = reader.readLine().split(" ");
        int[] arr = new int[Integer.parseInt(data[0])];
        int k = Integer.parseInt(data[1]);

        int min = Integer.MAX_VALUE;
        data = reader.readLine().split(" ");
        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(data[i]);
        }

        int index = 0;
        for (int i = 0; i <= arr.length - k; i++) {
            int temp = findSum(arr, i, k);
            if (min > temp) {
                min = temp;
                index = i + 1;
            }
        }
        System.out.println(index);
        reader.close();
    }

    private static int findSum(int[] arr, int x, int k) {
        int temp = 0;

        for (int i = x; i < x + k; i++) {
            temp += arr[i];
        }

        return temp;
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Task363B {

	public static void main(String... args) throws NumberFormatException,
			IOException {
		Solution.main(System.in, System.out);
	}

	static class Solution {

		public static void main(InputStream is, OutputStream os)
				throws NumberFormatException, IOException {
			PrintWriter pw = new PrintWriter(os);
			BufferedReader br = new BufferedReader(new InputStreamReader(is));

			String input[] = br.readLine().split(" ");

			int n = Integer.parseInt(input[0]);
			int k = Integer.parseInt(input[1]);

			input = br.readLine().split(" ");

			ArrayList<Integer> h = new ArrayList<>(n);
			for (int i = 0; i < n; i++) {
				h.add(Integer.parseInt(input[i]));
			}

			int curSum = 0;
			for (int i = 0; i < k; i++) {
				curSum += h.get(i);
			}
			int retVal = curSum;
			int retIndex = 0;

			for (int i = k; i < n; i++) {
				curSum += h.get(i) - h.get(i - k);
				if (curSum < retVal) {
					retVal = curSum;
					retIndex = i - k + 1;
				}
			}

			pw.println(retIndex);

			pw.flush();
			br.close();
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Task363B {

	public static void main(String... args) throws NumberFormatException,
			IOException {
		Solution.main(System.in, System.out);
	}

	static class Solution {

		public static void main(InputStream is, OutputStream os)
				throws NumberFormatException, IOException {
			PrintWriter pw = new PrintWriter(os);
			BufferedReader br = new BufferedReader(new InputStreamReader(is));

			String input[] = br.readLine().split(" ");

			int n = Integer.parseInt(input[0]);
			int k = Integer.parseInt(input[1]);

			input = br.readLine().split(" ");

			ArrayList<Integer> h = new ArrayList<>(n);
			for (int i = 0; i < n; i++) {
				h.add(Integer.parseInt(input[i]));
			}

			int curSum = 0;
			for (int i = 0; i < k; i++) {
				curSum += h.get(i);
			}
			int retVal = curSum;
			int retIndex = 1;

			for (int i = k; i < n; i++) {
				curSum += h.get(i) - h.get(i - k);
				if (curSum < retVal) {
					retVal = curSum;
					retIndex = i - k + 2;
				}
			}

			pw.println(retIndex);

			pw.flush();
			br.close();
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Task363B {

	public static void main(String... args) throws NumberFormatException,
			IOException {
		Solution.main(System.in, System.out);
	}

	static class Solution {

		public static void main(InputStream is, OutputStream os)
				throws NumberFormatException, IOException {
			PrintWriter pw = new PrintWriter(os);
			BufferedReader br = new BufferedReader(new InputStreamReader(is));

			String input[] = br.readLine().split(" ");

			int n = Integer.parseInt(input[0]);
			int k = Integer.parseInt(input[1]);

			input = br.readLine().split(" ");

			ArrayList<Integer> h = new ArrayList<>(n);
			for (int i = 0; i < n; i++) {
				h.add(Integer.parseInt(input[i]));
			}

			int curSum = 0;
			for (int i = 0; i < k; i++) {
				curSum += h.get(i);
			}
			int retVal = curSum;

			for (int i = k; i < n; i++) {
				curSum += h.get(i) - h.get(i - k);
				retVal = Math.min(curSum, retVal);
			}

			pw.println(retVal);

			pw.flush();
			br.close();
		}
	}

}


import java.util.Scanner;

public class a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int sum = 0;
        int j = 0;
        int sum1 = 0;
        int ind = 0;
        for (int i = 1; i <= n; i++) {
            j++;
            sum += sc.nextInt();
            if (j == k) {
                if (sum > sum1) {
                    ind = j;
                    sum1 = sum;
                }
                j=0;
                sum = 0;

            }
        }
        System.out.println(ind);
    }
}


import java.util.Scanner;

public class a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int sum = 0;
        int j = 0;
        int sum1 = 0;
        int j1 = 0;
        for (int i = 1; i <= n; i++) {
            j++;
            sum += sc.nextInt();
            if (j == k) {
                if (sum > sum1)
                    j1 = j;
                sum1 = sum;
                j = 0;
                sum = 0;
            }
        }
        System.out.println(j1);
    }
}


import java.util.Scanner;

public class a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int x[] = new int[n + 1];
        int ind = 1;
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            x[i] = sc.nextInt();
            if (i <= k)
                sum += x[i];
        }
        int min = sum;
        for (int i = 2; i <= n - k + 1; i++) {
            sum -= x[i - 1] + x[k + i - 1];
            if(min>sum){
                min=sum;
                ind=i;
            }
        }
        System.out.println(ind);
    }
}


import java.util.Scanner;

public class a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int x[] = new int[n + 1];
        int ind = 1;
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            x[i] = sc.nextInt();
            if (i <= k)
                sum += x[i];
        }
        int min = sum;
        for (int i = 2; i <= n - k + 1; i++) {
            sum =sum- x[i - 1] + x[k + i - 1];
            if(min>sum){
                min=sum;
                ind=i;
            }
        }
        System.out.println(ind);
    }
}


import java.util.Scanner;

public class a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int x[] = new int[n + 1];
        int ind = 1;
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            x[i] = sc.nextInt();
            if (i <= k)
                sum += x[i];
        }
        int min = sum;
        for (int i = 2; i <= n - k + 1; i++) {
            sum -= x[i - 1] + x[k + i - 1];
            min = Math.min(sum, min);
        }
        System.out.println(ind);
    }
}


import java.util.Scanner;

public class Main {

   public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] h = new int [n];
        int min = 0; int sum = 0; int j = 0;
        for (int i = 0; i< n; i++) {
            h[i] = sc.nextInt();
            if (i<k) {
                sum = sum + h[i];
                min = sum;
                j=0;
            }
            else {
                sum = sum-h[i-k]+h[i];
                if (sum < min){
                    min = sum;
                    j=i-k+1;
                }
            }
        }
        System.out.print(j+1);
    } }


import java.util.Scanner;

public class Main {

   public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] h = new int [n];
        int min = 0; int sum = 0; int j = 0;
        for (int i = 0; i< n; i++) {
            h[i] = sc.nextInt();
            if (i<k) {
                sum = sum + h[i];
                min = sum;
                j=i;
            }
            else {
                sum = sum-h[i-k]+h[i];
                if (sum < min){
                    min = sum;
                    j=i-k+1;
                }
            }
        }
        System.out.print(j+1);
    } }


import java.lang.*;
import java.io.*;
import java.util.*;

public class Fence {

	public static void main(String[] args) throws java.lang.Exception {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(in, out);
		out.close();
	}
}

class TaskA {

	public void solve(InputReader in, PrintWriter out) {
		int n = in.nextInt(), k = in.nextInt();
		int[] s = new int[n+5];
		int i, j;

		for (i=1; i<=n; ++i)
			s[i] = in.nextInt() + s[i-1];

		int ans = Integer.MAX_VALUE;
		int l = 0;

		for (i=1; i<=n-k+1; ++i) {
			j = s[i+k-1] - s[i-1];
			if (j < ans) {
				l = i;
				ans = j;
			}
		}
		out.println(l);
		// out.println(ans);
	}
}

class InputReader {
	public BufferedReader reader;
	public StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer==null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}
}


import java.util.Scanner;

public class fence {
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		int n = cin.nextInt();
		int k = cin.nextInt();
		int[] a = new int[n];
		int min = 0, v = 0;
		int i, tmp;
		for (i=0; i<n; ++i)
			a[i] = cin.nextInt();
		for (i=0; i<k; ++i)
			min += a[i];
		for (tmp=min; i<n; ++i) {
			tmp = tmp - a[i-k] + a[i];
			if (tmp < min) {
				min = tmp;
				v = i-k+1;
			}
		}
		System.out.println(v+1);
	}
}