864_C. Bus_9729
A bus moves along the coordinate line Ox from the point x = 0 to the point x = a. After starting from the point x = 0, it reaches the point x = a, immediately turns back and then moves to the point x = 0. After returning to the point x = 0 it immediately goes back to the point x = a and so on. Thus, the bus moves from x = 0 to x = a and back. Moving from the point x = 0 to x = a or from the point x = a to x = 0 is called a bus journey. In total, the bus must make k journeys.

The petrol tank of the bus can hold b liters of gasoline. To pass a single unit of distance the bus needs to spend exactly one liter of gasoline. The bus starts its first journey with a full petrol tank.

There is a gas station in point x = f. This point is between points x = 0 and x = a. There are no other gas stations on the bus route. While passing by a gas station in either direction the bus can stop and completely refuel its tank. Thus, after stopping to refuel the tank will contain b liters of gasoline.

What is the minimum number of times the bus needs to refuel at the point x = f to make k journeys? The first journey starts in the point x = 0.

Input

The first line contains four integers a, b, f, k (0 < f < a ≤ 106, 1 ≤ b ≤ 109, 1 ≤ k ≤ 104) — the endpoint of the first bus journey, the capacity of the fuel tank of the bus, the point where the gas station is located, and the required number of journeys.

Output

Print the minimum number of times the bus needs to refuel to make k journeys. If it is impossible for the bus to make k journeys, print -1.

Examples

Input

6 9 2 4


Output

4


Input

6 10 2 4


Output

2


Input

6 5 4 3


Output

-1

Note

In the first example the bus needs to refuel during each journey.

In the second example the bus can pass 10 units of distance without refueling. So the bus makes the whole first journey, passes 4 units of the distance of the second journey and arrives at the point with the gas station. Then it can refuel its tank, finish the second journey and pass 2 units of distance from the third journey. In this case, it will again arrive at the point with the gas station. Further, he can refill the tank up to 10 liters to finish the third journey and ride all the way of the fourth journey. At the end of the journey the tank will be empty. 

In the third example the bus can not make all 3 journeys because if it refuels during the second journey, the tanks will contain only 5 liters of gasoline, but the bus needs to pass 8 units of distance until next refueling.
import java.io.*;
import java.util.*;

public class A {
	public static void main (String[] args) { new A(); }

	public A() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int end = fs.nextInt();
		int gas = fs.nextInt();
		int loc = fs.nextInt();
		int reps = fs.nextInt();
		
		if(loc > gas || (reps > 1 && 2*(end-loc) > gas) || (reps == 1 && end-loc > gas) || (reps > 2 && 2*loc > gas)) {
			System.out.println(-1);
			return;
		}
		
		int res = 0, curGas = gas;
		for(int r = 0; r < reps; r++) {
			if(r % 2 == 0) {
				//0 -> a
				curGas -= loc;
				if(r < reps-1 && curGas < 2*(end-loc)) {
					curGas = gas;
					res++;
				}
				else if(curGas < end-loc) {
					curGas = gas;
					res++;
				}
				curGas -= end-loc;
			}
			else {
				
				curGas -= end-loc;
				if(r < reps-1 && curGas < 2*loc) {
					curGas = gas;
					res++;
				}
				else if(curGas < loc) {
					curGas = gas;
					res++;
				}
				curGas -= loc;
			}
		}
		
		out.println(res);
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}
6 9 2 4
 6 5 4 3
 6 10 2 4
 1000000 1000000000 999999 1
 140 480 1 40
 1000000 1000000 500000 1000
 2 1000000000 1 10000
 100 70 70 2
 3 1 2 1
 51 81 36 38
 10 8 6 2
 100 159 80 2
 6 4 4 2
 1000000 1 1 10000
 999999 39486793 138762 9282
 100 50 99 1
 1000000 8839233 302200 9999
 1000000 1 999999 10000
 3 1 1 1
 20 20 19 1
 1000000 8739233 400000 9999
 23 46 12 3
 6 7 4 2
 1000000 2500000 500000 9999
 15 65 5 50
 10 4 6 10
 10 8 7 2
 1000000 1000000000 1 1
 10 19 1 5
 20 50 10 25
 5 3 4 1
 10 11 6 2
 3 3 2 2
 10 10 9 2
 10 5 6 1
 1000000 1000000000 1 10000
 150 100 1 1
 2 2 1 1
 4 4 3 2
 10000 78393 3000 9999
 140 480 139 40
 5 4 4 2
 1000000 51923215 2302 10000
 1000000 1000000000 999999 1000
 1000000 1 1 1
 23 46 12 2
 1000000 500000 500000 1
 1000000 1500000 500000 10000
 2 1 1 10000
 900005 3333333 210000 9999
 2 1 1 1
 10 11 3 2
 2 1000000000 1 1
 1000000 1000000000 999999 10000
 10 8 8 2
 10 4 7 1
 6 5 5 2
 1000000 1000000000 1 1000
 10 10 5 20
 100000 1000000 50000 1000
 1000000 159842934 2376 1000
 1000000 1 999999 1
 1000000 1500000 500000 9999
 100 5 97 1
 2 1000000000 1 1000
 1000000 1000000 500000 10000
 20 23 17 2
 7 11 6 2
 1000000 70000000 333333 9999
 100 70 50 1
 10 19 9 5
 20 18 9 2
 1100000 1000000000 999999 1
 140 480 1 43
 1000010 1000000 500000 1000
 100 159 41 2
 999999 24917456 138762 9282
 1000001 8839233 302200 9999
 1000000 2500000 746773 9999
 15 65 8 50
 20 50 10 35
 10000 78393 3000 1959
 155 480 139 40
 1000000 51923215 559 10000
 900005 4994405 210000 9999
 1000000 1001000000 999999 10000
 10 10 5 39
 1000100 159842934 2376 1000
 1000000 1100000 500000 10000
 6 10 1 4
 108 480 1 43
 110 159 41 2
 999999 24917456 138762 8867
 20 81 10 35
 155 480 139 34
 1000000 37014908 559 10000
 900005 4994405 108318 9999
 10 10 5 43
 1000100 58323420 2376 1000
 728536 24917456 138762 8867
 3 1 4 1
 78 81 36 38
 1010000 1 1 10000
 100 50 142 1
 1000000 1 999999 10010
 3 1 1 2
 20 37 19 1
 1000000 8739233 249275 9999
 23 49 12 3
 6 7 2 2
 6 4 6 10
 10 8 7 1
 1000100 1000000000 1 1
 5 0 4 1
 19 11 6 2
 3 0 2 2
 10 7 6 1
 2 3 1 1
 5 4 4 1
 1000000 1000000000 999999 1010
 1000000 0 1 1
 23 18 12 2
 1000000 947960 500000 1
 2 0 1 1
 10 12 8 2
 10 4 3 1
 1000000 1000000000 2 1000
 1000000 1 999999 2
 1000000 550332 500000 9999
 100 6 97 1
 2 1000010000 1 1000
 7 11 6 1
 100 140 50 1
 6 5 6 3
 1100100 1000000000 999999 1
 3 1 6 1
 78 19 36 38
 1010000 1 1 10010
 1000000 2 999999 10010
 3 1 1 3
 1000000 8739233 322860 9999
 23 49 12 2
 6 2 2 2
 15 65 4 50
 6 4 1 10
 19 20 6 2
 3 1 2 2
 10 12 6 1
 1000000 1000001000 999999 1010
 23 15 12 2
 1001000 947960 500000 1
 10 21 8 2
 1000000 1000000000 4 1000
 1100000 1 999999 2
 1000000 474956 500000 9999
 14 11 6 1
 100 140 66 1
 6 2 6 3
 6 10 1 7
 1100110 1000000000 999999 1
 108 821 1 43
 3 1 9 1
 78 19 54 38
 110 159 25 2

4
 -1
 2
 0
 19
 1000
 0
 2
 -1
 36
 2
 1
 2
 -1
 244
 -1
 1249
 -1
 -1
 0
 1249
 1
 2
 4998
 12
 -1
 2
 0
 3
 11
 -1
 2
 2
 2
 -1
 10
 -1
 0
 2
 1428
 18
 2
 199
 0
 -1
 0
 1
 9998
 -1
 3332
 1
 -1
 0
 10
 2
 -1
 2
 0
 20
 100
 6
 -1
 9997
 -1
 0
 10000
 1
 1
 142
 1
 3
 -1 0
 20
 -1
 1
 386
 1249
 4999
 12
 16
 279
 18
 199
 1999
 9
 39
 6
 10000
 4
 10
 2
 369
 8
 15
 277
 2499
 43
 17
 260
 -1
 -1
 -1
 -1
 -1
 -1
 0
 1249
 1
 -1
 -1
 1
 0
 -1
 -1
 -1
 1
 0
 1
 1
 -1
 -1
 1
 -1
 1
 -1
 0
 -1
 -1
 -1
 0
 0
 0
 -1
 0
 -1
 -1
 -1
 -1
 -1
 1249
 0
 -1
 12
 -1
 -1
 -1
 0
 1
 -1
 1
 0
 0
 -1
 -1
 1
 0
 -1
 6
 0
 6
 -1
 -1
 -1
