Problem: Imagine that you are in a building that has exactly n floors. You can move between the floors in a lift. Let's number the floors from bottom to top with integers from 1 to n. Now you're on the floor number a. You are very bored, so you want to take the lift. Floor number b has a secret lab, the entry is forbidden. However, you already are in the mood and decide to make k consecutive trips in the lift.

Let us suppose that at the moment you are on the floor number x (initially, you were on floor a). For another trip between floors you choose some floor with number y (y ≠ x) and the lift travels to this floor. As you cannot visit floor b with the secret lab, you decided that the distance from the current floor x to the chosen y must be strictly less than the distance from the current floor x to floor b with the secret lab. Formally, it means that the following inequation must fulfill: |x - y| < |x - b|. After the lift successfully transports you to floor y, you write down number y in your notepad.

Your task is to find the number of distinct number sequences that you could have written in the notebook as the result of k trips in the lift. As the sought number of trips can be rather large, find the remainder after dividing the number by 1000000007 (109 + 7).

Input

The first line of the input contains four space-separated integers n, a, b, k (2 ≤ n ≤ 5000, 1 ≤ k ≤ 5000, 1 ≤ a, b ≤ n, a ≠ b).

Output

Print a single integer — the remainder after dividing the sought number of sequences by 1000000007 (109 + 7).

Examples

Input

5 2 4 1


Output

2


Input

5 2 4 2


Output

2


Input

5 3 4 1


Output

0

Note

Two sequences p1, p2, ..., pk and q1, q2, ..., qk are distinct, if there is such integer j (1 ≤ j ≤ k), that pj ≠ qj.

Notes to the samples:

  1. In the first sample after the first trip you are either on floor 1, or on floor 3, because |1 - 2| < |2 - 4| and |3 - 2| < |2 - 4|. 
  2. In the second sample there are two possible sequences: (1, 2); (1, 3). You cannot choose floor 3 for the first trip because in this case no floor can be the floor for the second trip. 
  3. In the third sample there are no sought sequences, because you cannot choose the floor for the first trip. 

Solution (in JAVA):

Solution:
import java.util.Arrays;
import java.util.Scanner;

/*
 * Codeforces Round #274 (Div. 2)
 * http://codeforces.ru/contest/479
 */

public class Main {
	public static void main(String[] args) {
		E();
	}

	public static void A() {
		int a = IO.readInt();
		int b = IO.readInt();
		int c = IO.readInt();
		
		int max = a + b + c;
		if (a + b * c > max) {
			max = a + b * c;
		}
		if (a * b + c > max) {
			max = a * b + c;
		}
		if (a * b * c > max) {
			max = a * b * c;
		}
		if ((a + b) * c > max) {
			max = (a + b) * c;
		}
		if (a * (b + c) > max) {
			max = a * (b + c);
		}
		
		IO.println(max);
	}
	
	public static void B() {
		int n = IO.readInt();
		int k = IO.readInt();
		
		Castle[] a1 = new Castle[n];
		Castle[] a2 = new Castle[n];
		
		for (int index = 0; index < n; ++index) {
			a1[index] = new Castle();
			a1[index].i = index + 1;
			a1[index].n = IO.readInt();
		}
		
		Arrays.sort(a1);
		
		for (int index = 0; index < n; ++index) {
			a2[index] = new Castle();
			a2[index].i = a1[index].i;
			a2[index].n = a1[index].n;
		}
		
		int d = a1[n - 1].n - a1[0].n;
		int l = k;
		int minStep = 0;
		while (d > 0 && l > 0) {
			if (a1[n - 1].n - 1 < a1[0].n + 1) {
				break;
			}
			
			a1[n - 1].n--;
			a1[0].n++;
			
			l--;
			
			Arrays.sort(a1);
			
			int newD = a1[n - 1].n - a1[0].n;
			if (newD < d) {
				d = newD;
				minStep = k - l;
			}
		}
		
		IO.println(d + " " + minStep);
		
		while (minStep > 0) {
			if (a2[n - 1].n - 1 < a2[0].n + 1) {
				break;
			}
			
			IO.println(a2[n - 1].i + " " + a2[0].i);
			
			a2[n - 1].n--;
			a2[0].n++;
			
			minStep--;
			
			Arrays.sort(a2);
		}
	}
	
	private static class Castle implements Comparable<Castle>{
		private int n;
		private int i;
		
		@Override
		public int compareTo(Castle o) {
			return Integer.compare(n, o.n);
		}
	}
	
	private static void swap(Castle[] a, int i, int j) {
		Castle temp = a[j];
		a[j] = a[i];
		a[i] = temp;
	}
	
	public static void C() {
		int n = IO.readInt();
		
		Exam[] a = new Exam[n];
		for (int index = 0; index < n; ++index) {
			a[index] = new Exam();
			a[index].a = IO.readInt();
			a[index].b = IO.readInt();
		}
		
		Arrays.sort(a);
		
		int minGroup = -1;
		int minPrevGroup = -1;
		
		for (int index = 0; index < n; ++index) {
			if (index > 0 && a[index].a != a[index - 1].a) {
				minPrevGroup = minGroup;
				minGroup = -1;
			}
			
			if (a[index].b < minPrevGroup) {
				minGroup = a[index].a;
			}
			else if (a[index].b > minGroup){
				minGroup = a[index].b;
			}
		}
		
		IO.println(minGroup);
	}
	
	private static class Exam implements Comparable<Exam>{
		int a;
		int b;
		
		@Override
		public int compareTo(Exam o) {
			return Integer.compare(a, o.a);
		}
		
		
	}
	
	public static void D() {
		int n = IO.readInt();
		int l = IO.readInt();
		int y = IO.readInt();
		int x = IO.readInt();
		
		int[] a = new int[n];
		for (int i = 0; i < n; ++i) {
			a[i] = IO.readInt();
		}
		
		int measureX = find(a, x);
		int measureY = find(a, y);
		
		if (measureX > -1 && measureY > -1) {
			IO.println(0);
			return;
		}
		else if (measureX > -1) {
			IO.println(1);
			IO.println(y);
			return;
		} 
		else if (measureY > -1) {
			IO.println(1);
			IO.println(x);
			return;
		}
		
		int measure = find(a, x - y, y);
		if (measure > -1) { 
			IO.println(1);
			if (measure >= y) {
				IO.println(measure - y);
			}
			else {
				IO.println(measure + x);
			}
			return;
		}
		
		if (((long) x) + y <= (long) l) {
			measure = find(a, x + y);
			if (measure > -1) { 
				IO.println(1);
				IO.println(measure + y);
				return;
			}
		}
		
		IO.println(2);
		IO.println(y + " " + x);
	}

	private static int find(int[] a, int x) {
		int i = 0;
		int j = 1;
		while (true) {
			int d = a[j] - a[i];
			if (d == x) {
				return a[i];
			}
			else if (d > x){
				if (i + 1 < j) {
					i++;
				}
				else if (j < a.length - 1) {
					j++;
				}
				else {
					break;
				}
			}
			else {
				if (j < a.length - 1) {
					j++;
				}
				else {
					break;
				}
			}
			
		}
		
		return -1;
	}
	
	private static int find(int[] a, int x, int margin) {
		int i = 0;
		int j = 1;
		while (true) {
			int d = a[j] - a[i];
			if (d == x && (a[i] >= margin || (a[a.length - 1] - a[j]) >= margin)) {
				return a[i];
			}
			else if (d > x){
				if (i + 1 < j) {
					i++;
				}
				else if (j < a.length - 1) {
					j++;
				}
				else {
					break;
				}
			}
			else {
				if (j < a.length - 1) {
					j++;
				}
				else {
					break;
				}
			}
			
		}
		
		return -1;
	}
	
	public static void E() {
		int mod = 1000000007;
		
		int n = IO.readInt();
		int a = IO.readInt();
		int b = IO.readInt();
		int k = IO.readInt();
		
		int h = a > b ? n - b : b - 1;
		int s = a > b ? a - b - 1 : b - a - 1;
		
		int[][] t = new int[k + 1][h];
		for (int i = 0; i <= k; ++i) {
			for (int j = 0; j < h; ++j) {
				if (i == 0) {
					t[i][j] = 1;
				}
				else if (j == 0) {
					t[i][j] = 0;
				}
				else {
					t[i][j] = t[i][j - 1] + t[i - 1][j - 1];
					t[i][j] %= mod;
					if (2 * j < h) {
						t[i][j] += t[i - 1][2 * j];
						t[i][j] %= mod;
						t[i][j] += t[i - 1][2 * j - 1];
						t[i][j] %= mod;
					}
					else if (2 * j - 1 < h) {
						t[i][j] += t[i - 1][2 * j - 1];
						t[i][j] %= mod;
					}
					if (t[i][j] < t[i - 1][j]) {
						t[i][j] += mod;
					}
					t[i][j] -= t[i - 1][j];
				}
			}
		}
		
		IO.println(t[k][s]);
	}
	
	
	
	//************* Input/Output *************//
	
	private static class IO {
		static {
			setUpScanner();
		}

		private static Scanner scanner;

		private static void setUpScanner() {
			scanner = new Scanner(new java.io.BufferedInputStream(System.in));
		};

		public static boolean isEmpty() {
			return !scanner.hasNext();
		}

		public static boolean hasNextLine() {
			return scanner.hasNextLine();
		}

		public static String readLine() {
			String line;
			try {
				line = scanner.nextLine();
			} catch (Exception e) {
				line = null;
			}
			return line;
		}

		public static String readString() {
			return scanner.next();
		}

		public static int readInt() {
			return scanner.nextInt();
		}

		public static double readDouble() {
			return scanner.nextDouble();
		}

		public static float readFloat() {
			return scanner.nextFloat();
		}

		public static long readLong() {
			return scanner.nextLong();
		}

		public static void print(Object o) {
			System.out.print(o.toString());
		}

		public static void println(Object o) {
			System.out.println(o);
		}
	}

	
	
	//************* Algorithms *************//
	
	private static class Algo {
		
		public static int binSearch(int[] array, int n, int lo, int hi) {
			if (lo > hi) {
				return lo;
			}
			
			int mid = lo + (hi - lo) /2;
			int cmp = (int) Math.signum(n - array[mid]);
			if (cmp < 0) {
				return binSearch(array, n, lo, mid - 1);
			}
			else if (cmp == 0) {
				return mid;
			}
			else {
				return binSearch(array, n, mid + 1, hi);
			}
		}
		
	}
}