output_description: Print the number of the different divisions under the conditions, modulo 10^9
  + 7.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N A B
      S_1
      :
      S_N
attempt: def examA():
      N = I()
      A = [0] * N
      B = [0] * N
      for i in range(N):
          A[i], B[i] = LI()
      cum = 0
      for i in range(N)[::-1]:
          cum += (-(cum + A[i])) % B[i]
          # print(cum)
  
      ans = cum
      print(ans)
      return
  
  
  def examB():
      N = I()
      V = [[] for _ in range(N)]
      for i in range(1, N):
          a = I() - 1
          V[a].append(i)
      # print(V)
      dp = [0] * N
  
      def dfs(n, s):
          children = []
          for i in V[s]:
              child = dfs(n, i)
              children.append(child)
          rep = 0
          children.sort()
          for i, c in enumerate(children[::-1], start=1):
              rep = max(rep, i + c)
          dp[s] = rep
          return rep
  
      ans = dfs(N, 0)
      print(ans)
      return
  
  
  def examC():
      class segment_:
          def __init__(self, A, n, segfunc, ide_ele=0):
              #####単位元######要設定0or1orinf
              self.ide_ele = ide_ele
              ####################
              self.num = 1 << (n - 1).bit_length()
              self.seg = [self.ide_ele] * 2 * self.num
              self.segfunc = segfunc
              # set_val
              for i in range(n):
                  self.seg[i + self.num] = A[i]
                  # built
              for i in range(self.num - 1, 0, -1):
                  self.seg[i] = self.segfunc(self.seg[2 * i], self.seg[2 * i + 1])
  
          def update(self, k, r):
              k += self.num
              self.seg[k] = r
              while k:
                  k >>= 1
                  self.seg[k] = self.segfunc(self.seg[k * 2], self.seg[k * 2 + 1])
  
          # 値xに1加算
          def update1(self, k):
              k += self.num
              self.seg[k] += 1
              while k:
                  k >>= 1
                  self.seg[k] = self.segfunc(self.seg[k * 2], self.seg[k * 2 + 1])
  
          def updateneg1(self, k):
              k += self.num
              self.seg[k] -= 1
              while k:
                  k >>= 1
                  self.seg[k] = self.segfunc(self.seg[k * 2], self.seg[k * 2 + 1])
  
          def query(self, p, q):
              # qは含まない
              if q < p:
                  return self.ide_ele
              p += self.num
              q += self.num
              res = self.ide_ele
              while p < q:
                  if p & 1 == 1:
                      res = self.segfunc(res, self.seg[p])
                      p += 1
                  if q & 1 == 1:
                      q -= 1
                      res = self.segfunc(res, self.seg[q])
                  p >>= 1
                  q >>= 1
              return res
  
      N, A, B = LI()
      S = [I() for _ in range(N)]
      S.insert(0, -inf)
      # print(S)
      if A > B:
          A, B = B, A
      for i in range(N - 1):
          if S[i + 2] - S[i] < A:
              print(0)
              return
      dp = [0] * (N + 1)
      dp[0] = 1
      dp[1] = 1
      num = N + 1
      L = [0] * num
      Seg_sum = segment_(L, num, lambda a, b: a + b)
      la = 0
      lb = -1
      Seg_sum.update(0, 1)
      Seg_sum.update(1, 1)
      for i in range(1, N):
          while lb < i and S[i + 1] - S[lb + 1] >= B:
              lb += 1
          dp[i + 1] = Seg_sum.query(0, lb + 1)
          Seg_sum.update(i + 1, dp[i + 1])
          # dp[i+1] = sum(dp[:lb+1])
          if S[i + 1] - S[i] < A:
              for a in range(la, i):
                  Seg_sum.update(a, 0)
                  dp[a] = 0
              la = i
          # print(dp)
      # print(dp)
  
      ans = sum(dp)
      print(ans)
      return
  
  
  def examD():
      ans = 0
      print(ans)
      return
  
  
  def examE():
      ans = 0
      print(ans)
      return
  
  
  def examF():
      ans = 0
      print(ans)
      return
  
  
  import sys, bisect, itertools, heapq, math, random
  from copy import deepcopy
  from heapq import heappop, heappush, heapify
  from collections import Counter, defaultdict, deque
  
  
  def I():
      return int(sys.stdin.readline())
  
  
  def LI():
      return list(map(int, sys.stdin.readline().split()))
  
  
  def LSI():
      return list(map(str, sys.stdin.readline().split()))
  
  
  def LS():
      return sys.stdin.readline().split()
  
  
  def SI():
      return sys.stdin.readline().strip()
  
  
  global mod, mod2, inf, alphabet, _ep
  mod = 10**9 + 7
  mod2 = 998244353
  inf = 10**18
  _ep = 10 ** (-12)
  alphabet = [chr(ord("a") + i) for i in range(26)]
  
  sys.setrecursionlimit(10**6)
  
  if __name__ == "__main__":
      examC()
  
  """
  
  """
  
problem_description: Statement
  
  There is a set consisting of N distinct integers. The i-th smallest element in
  this set is S_i. We want to divide this set into two sets, X and Y, such that:
  
    * The absolute difference of any two distinct elements in X is A or greater.
    * The absolute difference of any two distinct elements in Y is B or greater.
  
  How many ways are there to perform such division, modulo 10^9 + 7? Note that
  one of X and Y may be empty.
samples: [{"input": "5 3 7\n    1\n    3\n    6\n    9\n    12", "output": "5\n    \n\nThere are five ways to perform division:\n\n  * X={1,6,9,12}, Y={3}\n  * X={1,6,9}, Y={3,12}\n  * X={3,6,9,12}, Y={1}\n  * X={3,6,9}, Y={1,12}\n  * X={3,6,12}, Y={1,9}\n\n* * *"}, {"input": "7 5 3\n    0\n    2\n    4\n    7\n    8\n    11\n    15", "output": "4\n    \n\n* * *"}, {"input": "8 2 9\n    3\n    4\n    5\n    13\n    15\n    22\n    26\n    32", "output": "13\n    \n\n* * *"}, {"input": "3 3 4\n    5\n    6\n    7", "output": "0"}]