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

public class excursion_sm {

	void solve() throws IOException {
		int n = nextInt();
		assert 1 <= n && n <= 1e5;
		int k = nextInt();
		assert 1 <= k && k <= n;
		int[] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextInt();
			assert 1 <= a[i] && a[i] <= 1e9;
		}
		map = new HashMap<Integer, Integer>();
		int best = 0;
		int besti = 0;
		for (int i = 0; i < k; i++) {
			inc(a[i]);
		}
		if (map.size() > best) {
			best = map.size();
			besti = 1;
		}
		for (int i = k; i < a.length; i++) {
			dec(a[i - k]);
			inc(a[i]);
			if (map.size() > best) {
				best = map.size();
				besti = i - k + 2;
			}
		}
		out.println(besti);
	}

	void inc(int k) {
		if (map.containsKey(k)) {
			map.put(k, map.get(k) + 1);
		} else {
			map.put(k, 1);
		}
	}

	void dec(int k) {
		if (map.get(k) == 1) {
			map.remove(k);
		} else {
			map.put(k, map.get(k) - 1);
		}
	}

	Map<Integer, Integer> map;

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;

	final String filename = "excursion";

	public void run() {
		try {
			br = new BufferedReader(new FileReader(filename + ".in"));
			out = new PrintWriter(filename + ".out");
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	String nextToken() {
		try {
			while (st == null || !st.hasMoreTokens()) {
				String s = br.readLine();
				if (s == null) {
					return null;
				}
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		} catch (IOException e) {
			throw new RuntimeException();
		}
	}

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

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

	public static void main(String[] args) {
		new excursion_sm().run();
	}
}
