// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx,avx2,fma")

#include <iostream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <cstring>
#include <chrono>
#include <vector>
#include <map>
#include <random>
#include <set>
#include <algorithm>
#include <math.h>
#include <cstdio>
#include <stdio.h>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <deque>
#include <cassert>
#include <stack>
using namespace std;
 
#define mp make_pair
#define f first
#define se second
#define pb push_back
#define ppb pop_back
#define ll long long
#define ull unsigned long long
#define cntbit(x) __builtin_popcount(x)
#define endl '\n'
#define uset unordered_set
#define umap unordered_map
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define ld long double
#define pll pair<long long, long long>
#define int long long

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
template <typename T> inline T range(T l, T r) {
	return uniform_int_distribution <T>(l, r)(rng);
}
 
template <typename T> void Min(T &a, T b) {
    a = min(a, b);
}
 
template <typename T> void Max(T &a, T b) {
    a = max(a, b);
}

template <typename T> ostream &operator << (ostream &cout, vector <T> x) {
	for(auto it = x.begin(); it != x.end(); ++it) {
		if(it == x.begin())
			cout << "{" << *it;
		else
			cout << ", " << *it;
	}
	cout << "}";
	return cout;
}

template <typename T> ostream &operator << (ostream &cout, set <T> x) {
	for(auto it = x.begin(); it != x.end(); ++it) {
		if(it == x.begin())
			cout << "{" << *it;
		else
			cout << ", " << *it;
	}
	cout << "}";
	return cout;
}

const ll inf = 2e18;
const int mod = 1e9 + 7;
const int N = 2e5 + 15;
const int L = 22;
int n, x, y, a[N];
int ans;

int dp[N][2];

// dp[i][whether_last_in_block]

struct rmq {
	int st[L][N], lg[N];
	inline void build() {
		for(int i = 2; i < N; ++i)
			lg[i] = lg[i >> 1] + 1;
		for(int i = 1; i < n; ++i)
			st[0][i] = a[i + 1] - a[i];
		for(int j = 1; j < L; ++j)
			for(int i = 1; i < n; ++i)
				st[j][i] = min(st[j-1][i], st[j-1][min(n - 1, i + (1 << (j - 1)))]);
	}
	inline int get(int l, int r) {
		if(l > r)
			return inf;
		int LG = lg[r - l + 1];
		return min(st[LG][l], st[LG][r - (1 << LG) + 1]);
	}
} st;

inline int add(int a, int b) {
	a = ((a + b) % mod);
	a = (a + mod) % mod;
	return a;
}

inline int mt(int a, int b) {
	return (ll)a * b % mod;
}

inline void add_t(int &a, int b) {
	a = add(a, b);
}

struct fenwick {
	int t[N];
	fenwick() {
		memset(t, 0, sizeof(t));
	}
	inline void inc(int i, int val) {
		for(; i <= n; i = (i | (i + 1)))
			add_t(t[i], val);
	}
	inline int get(int i) {
		int res = 0;
		for(; i > 0; i = (i & (i + 1)) - 1)
			add_t(res, t[i]);
		return res;
	}
	inline void add(int l, int r, int x) {
		if(l <= r) {
			inc(l, x);
			inc(r + 1, -x);
		}
	}
} t[2];

main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> n >> x >> y;
	for(int i = 1; i <= n; ++i)
		cin >> a[i];

	st.build();

	for(int i = 1; i <= n; ++i)
		if(st.get(1, i - 2) >= y)
			t[0].add(i, i, 1);

	for(int i = 1; i <= n; ++i) {
		int l = i, r = n, resl = -1, resr = -1;
		while(l <= r) {
			int mid = l + r >> 1;
			if(st.get(i, mid - 1) < x)
				r = mid - 1;
			else
				l = mid + 1, resr = mid;
		}

		l = i, r = n;
		while(l <= r) {
			int mid = l + r >> 1;
			if(i - 1 < 1 || mid + 1 > n || a[mid + 1] - a[i - 1] >= y)
				r = mid - 1, resl = mid;
			else
				l = mid + 1;
		}

		if(resl != -1 && resr != -1)
			t[1].add(resl, resr, t[0].get(i));

		l = i + 2, r = n, resl = -1, resr = -1;

		while(l <= r) {
			int mid = l + r >> 1;
			if(st.get(i + 1, mid - 2) < y)
				r = mid - 1;
			else
				l = mid + 1, resr = mid;
		}

		l = i + 2, r = resr;
		while(l <= r) {
			int mid = l + r >> 1;
			if(a[mid] - a[i] >= x)
				r = mid - 1, resl = mid;
			else
				l = mid + 1;
		}

		if(resl != -1 && resr != -1)
			t[0].add(resl, resr, t[1].get(i));

		// for(int j = i + 2; j <= n; ++j)
		// 	if(st.get(i + 1, j - 2) >= y && a[j] - a[i] >= x)
		// 		add_t(dp[j][0], dp[i][1]);
		// for(int j = i; j <= n; ++j)
		// 	if(st.get(i, j - 1) >= x && (i - 1 < 1 || j + 1 > n || a[j+1] - a[i-1] >= y))
		// 		add_t(dp[j][1], dp[i][0]);
	}
	for(int i = n; i; --i)
		if(st.get(i + 1, n - 1) >= y)
			add_t(ans, t[1].get(i));
	if(st.get(1, n - 1) >= y)
		add_t(ans, 1);
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 43392