#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100030;
const long long MODD = 1000000009;
class FenwickTree {
 public:
  FenwickTree(int n) : N(n), iBM(1), tree(n, 0) {
    while (iBM < N) iBM *= 2;
  }
  void incEntry(int idx, int val) {
    do tree[idx] += val;
    while (idx && (idx += (idx & (-idx))) < N);
  }
  int cumulativeSum(int idx) const {
    int sum = tree[0];
    for (; idx > 0; idx &= idx - 1) sum += tree[idx];
    return sum;
  }

 private:
  int N, iBM;
  vector<int> tree;
};
long long A[MAX_N];
long long N, E, T;
long long f(long long len) {
  if (2 * len >= T) return 2 * len;
  return T;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> E >> T;
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<pair<long long, int> > d;
  for (int i = 1; i < N; i++) d.emplace_back(A[i] - A[i - 1], i - 1);
  sort(d.rbegin(), d.rend());
  vector<pair<int, int> > ints;
  ints.emplace_back(0ll, N - 1);
  FenwickTree F(N + 1);
  long long ans = E + f(A[N - 1] - A[0]);
  long long best = ans;
  for (int i = 0; i < N - 1; i++) {
    int idx = d[i].second;
    int where = F.cumulativeSum(idx);
    int len = A[ints[where].second] - A[ints[where].first];
    ans -= f(len);
    ints.emplace_back(idx + 1, ints[where].second);
    ints[where].second = idx;
    F.incEntry(idx + 1, (int)ints.size() - 1 - where);
    F.incEntry(ints.back().second + 1, where + 1 - (int)ints.size());
    ans += f(A[ints[where].second] - A[ints[where].first]) +
           f(A[ints.back().second] - A[ints.back().first]);
    if (best > ans) best = ans;
  }
  cout << best << endl;
  return 0;
}
