#include <bits/stdc++.h>
using namespace std;
const long long LINF = 334ll << 53;
const int INF = 15 << 26;
const long long MOD = 1E9 + 7;
long long t;
struct UnionFind {
  vector<int> par;
  vector<long long> w;
  UnionFind(int n) {
    par = vector<int>(n, -1);
    w = vector<long long>(n, 0);
  }
  int root(int x) {
    if (par[x] < 0) {
      return x;
    } else {
      return par[x] = root(par[x]);
    }
  }
  void unite(int x, int y, long long a) {
    x = root(x);
    y = root(y);
    if (x != y) {
      if (par[x] < par[y]) swap(x, y);
      par[y] += par[x];
      par[x] = y;
    }
    w[y] = w[y] + w[x] + a;
    return;
  }
  bool same(int x, int y) { return root(x) == root(y); }
  int size(int x) { return -par[root(x)]; }
  long long rest(int x) { return max(0ll, t - w[root(x)]); }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  long long e;
  cin >> n >> e >> t;
  long long ans = e;
  vector<int> x(n), dx(n - 1);
  for (int(i) = 0; (i) < (n); ++(i)) cin >> x[i];
  for (int(i) = 0; (i) < (n - 1); ++(i)) dx[i] = (x[i + 1] - x[i]) * 2;
  UnionFind P(n);
  typedef tuple<long long, int, int> TP;
  priority_queue<TP> Q;
  for (int(i) = 0; (i) < (n - 1); ++(i)) {
    Q.push(make_tuple(min(t, 2 * t - dx[i]), i, i + 1));
  }
  while (!Q.empty() && get<0>(Q.top()) > 0) {
    long long c, l, r;
    tie(c, l, r) = Q.top();
    Q.pop();
    if ((l == 0 && r == n - 1) || (l == 0 && !P.same(r, r + 1)) ||
        (r == n - 1 && !P.same(l - 1, l)) ||
        (!P.same(l - 1, l) && !P.same(r, r + 1))) {
      P.unite(l, r, dx[l + P.size(l) - 1]);
      if (r != n - 1) {
        int newr = r + P.size(r + 1);
        long long r1 = P.rest(l), r2 = P.rest(newr);
        Q.push(make_tuple(min(t, r1 + r2 - dx[r]), l, newr));
      }
      if (l != 0) {
        int newl = l - P.size(l - 1);
        long long r1 = P.rest(r), r2 = P.rest(newl);
        Q.push(make_tuple(min(t, r1 + r2 - dx[l - 1]), newl, r));
      }
    }
  }
  for (int(i) = 0; (i) < (n); ++(i)) {
    if (P.par[i] < 0) ans += max(t, P.w[i]);
  }
  cout << ans << endl;
  return 0;
}
