#include <bits/stdc++.h>
using namespace std;
const int inf = 0x7fffffff;
const long long INF = 0x7fffffffffffffff;
template <typename A, typename B>
ostream &operator<<(ostream &s, const pair<A, B> &p) {
  return s << "(" << p.first << "," << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &s, const vector<T> &c) {
  s << "[ ";
  for (auto it : c) s << it << " ";
  s << "]";
  return s;
}
template <typename T>
ostream &operator<<(ostream &o, const set<T> &st) {
  o << "{";
  for (auto it = st.begin(); it != st.end(); it++)
    o << (it == st.begin() ? "" : ", ") << *it;
  return o << "}";
}
template <typename T1, typename T2>
ostream &operator<<(ostream &o, const map<T1, T2> &make_pair) {
  o << "{";
  for (auto it = make_pair.begin(); it != make_pair.end(); it++) {
    o << (it == make_pair.begin() ? "" : ", ") << it->first << ":"
      << it->second;
  }
  o << "}";
  return o;
}
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
long long dp[100005];
int x[100005];
int main() {
  int n = getint();
  int e = getint();
  int T = getint();
  x[0] = 0;
  for (int i = 1; i <= n; i++) x[i] = getint();
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    long long mn = dp[i - 1] + x[i] - x[i - 1] + T;
    for (int j = 0; j < i - 1; j++) {
      long long cans = dp[j] + x[j + 1] - x[j] + max((x[i] - x[j + 1]) * 2, T) +
                       x[i] - x[j + 1];
      mn = min(mn, cans);
    }
    (void)0;
    dp[i] = mn;
  }
  cout << 1LL * e - x[n] + dp[n] << endl;
}
