Alexandra has a paper strip with n numbers on it. Let's call them ai from left to right.

Now Alexandra wants to split it into some pieces (possibly 1). For each piece of strip, it must satisfy:

  * Each piece should contain at least l numbers.
  * The difference between the maximal and the minimal number on the piece should be at most s.



Please help Alexandra to find the minimal number of pieces meeting the condition above.

Input

The first line contains three space-separated integers n, s, l (1 ≤ n ≤ 105, 0 ≤ s ≤ 109, 1 ≤ l ≤ 105).

The second line contains n integers ai separated by spaces ( - 109 ≤ ai ≤ 109).

Output

Output the minimal number of strip pieces.

If there are no ways to split the strip, output -1.

Examples

Input

7 2 2
1 3 1 2 4 1 2


Output

3


Input

7 2 2
1 100 1 100 1 100 1


Output

-1

Note

For the first sample, we can split the strip into 3 pieces: [1, 3, 1], [2, 4], [1, 2].

For the second sample, we can't let 1 and 100 be on the same piece, so no solution exists.
import java.util.*;
import java.io.*;
import java.math.*;
public class SegmentTree{
    
    static class Node{
		int min;
		int from;
		int to;
	}
	
	Node[] heap;
	static int[] array;
	int size;
	
	public SegmentTree(){
		size = (int)(2*Math.pow(2.0,Math.floor((Math.log((double)array.length)/Math.log(2.0))+1)));
		heap = new Node[size];
		build(1,0,array.length);
	}
	private void build(int v,int from,int size){
		heap[v] = new Node();
		heap[v].from = from;
		heap[v].to = from + size - 1;
		
		if(size==1) heap[v].min = array[from];
		else{
			build(2*v,from,size/2);
			build(2*v+1,from+size/2,size-size/2);
			
			heap[v].min = (int) Math.min(heap[2*v].min,heap[2*v+1].min);
		}
	}
	
	public int min(int from,int to){
		return min(1,from,to);
	}
	private int min(int v,int from,int to){
		Node n = heap[v];
		if(contains(from,to,n.from,n.to)) return heap[v].min;
		
		if(intersects(from,to,n.from,n.to)){
			int leftSum = min(2*v,from,to);
			int rightSum = min(2*v+1,from,to);
			return (int) Math.min(leftSum,rightSum);
		}
		
		return 100001;
	}
	
	public void update(int place,int value){
		update(1,place,value,0,array.length);
		array[place] = value;
	}
	private void update(int v,int place,int value,int from,int size){
		
		if(size==1) {
		    heap[v].min = value;
		    return ;
		}
		
		if(place<from+size/2)
			update(v*2,place,value,from,size/2);
		else 
			update(v*2+1,place,value,from+size/2,size-size/2);
			
		heap[v].min = (int) Math.min(heap[v*2].min,heap[v*2+1].min);
		
	}
	
	private boolean contains(int from1,int to1,int from2,int to2){
		return (from2>=from1 && to2<=to1);
	}
	
	private boolean intersects(int from1,int to1,int from2,int to2){
		return ((from1<=from2 && to1>=from2) || (from1>=from2 && from1<=to2));
	}
	
	
	
	
	
    
    public static void main(String[] args)throws IOException{
                
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        
        int n = Integer.parseInt(st.nextToken());
        int s = Integer.parseInt(st.nextToken());
        int l = Integer.parseInt(st.nextToken());
        
        int[] a = new int[n];
        array = new int[n];
        st = new StringTokenizer(br.readLine());
        for(int i=0;i<n;i++){
            a[i] = Integer.parseInt(st.nextToken());
        } 
        Arrays.fill(array,n+1);
        
        SegmentTree sgt = new SegmentTree();
        
        int k = (int)(Math.log(n)/Math.log(2))+1;
        int[][] min = new int[n][k];
        int[][] max = new int[n][k];
        for(int i=0;i<n;i++){
            min[i][0] = a[i];
            max[i][0] = a[i];
        }
        
        for(int j=1;j<k;j++){
            for(int i=0;i<=n-(1<<j);i++){
                min[i][j] = (int) Math.min(min[i][j-1],min[i+(1<<(j-1))][j-1]);
                max[i][j] = (int) Math.max(max[i][j-1],max[i+(1<<(j-1))][j-1]);
            }
        }
        int d,first,last,val=-1,qmax,qmin;
        int e,r;
        //int reponse = 0;
        if(l==1) val = n;
        for(int i=n-l;i>=0;i--){
            e = i;
            r = i+l-1;
            d = (int) (Math.log(r-e+1)/Math.log(2));
            qmax = (int) Math.max(max[e][d],max[r-(1<<d)+1][d]);
            qmin = (int) Math.min(min[e][d],min[r-(1<<d)+1][d]);
            if(qmax-qmin>s) {
                val = -1;
                continue;
            }
            first = i+l;
            
            r = n-1;
            d = (int) (Math.log(r-e+1)/Math.log(2));
            qmax = (int) Math.max(max[e][d],max[r-(1<<d)+1][d]);
            qmin = (int) Math.min(min[e][d],min[r-(1<<d)+1][d]);
            if(qmax-qmin<=s){
                sgt.update(i,1);
                val = 1;
                continue;
            }
            
            int x = first-1,y = n-1;
            while(y!=x+1){
                r = (x+y)/2;
                d = (int) (Math.log(r-e+1)/Math.log(2));
                qmax = (int) Math.max(max[e][d],max[r-(1<<d)+1][d]);
                qmin = (int) Math.min(min[e][d],min[r-(1<<d)+1][d]);
                if(qmax-qmin<=s) x = r;
                else y = r;
            }
            
            last = x + 1;
            val = sgt.min(first,last);
            val++;
            //reponse = val;
            if(val<=n) sgt.update(i,val);
            
            /*
            if(i==8){
                System.out.println(first+" "+last);
                r = last-1;
                d = (int) (Math.log(r-e+1)/Math.log(2));
                qmax = (int) Math.max(max[e][d],max[r-(1<<d)+1][d]);
                qmin = (int) Math.min(min[e][d],min[r-(1<<d)+1][d]);
                if(qmax-qmin<=s) System.out.println("yes");
                else System.out.println("no");
                
            } 
            */
            //if(i==0) System.out.println(val);
            
        }
        
        /*
        for(int i=0;i<n;i++){
            for(int j=i;j<n;j++){
                e = i;
                r = j;
                d = (int) (Math.log(r-e+1)/Math.log(2));
                qmax = (int) Math.max(max[e][d],max[r-(1<<d)+1][d]);
                qmin = (int) Math.min(min[e][d],min[r-(1<<d)+1][d]);
                System.out.println("["+i+" "+j+"]"+" : "+qmax+" "+qmin);
            }
        }
        */
        /*
        for(int i=0;i<n;i++) System.out.println("["+i+"]"+" : "+sgt.min(i,i)); 
        
        for(int i=n-1;i>=0;i--){
            for(int j=i;j<n;j++){
                //System.out.println("["+i+" "+j+"]"+" : "+sgt.min(i,j));
            }
        }
        */
        
        if(val>n) val = -1;
        System.out.println(val);
        
    }
    
}