#include <bits/stdc++.h>
using namespace std;
template <typename T>
class SegmentTree {
 public:
  int n;
  T dat[2 * (1 << 17) - 1];
  void init(int _n);
  void update(int k, T a);
  T query(int a, int b, int k, int l, int r);
  T query(int a, int b);
};
template <typename T>
void SegmentTree<T>::init(int _n) {
  n = 1;
  while (n < _n) {
    n <<= 1;
  }
  for (int i = 0; i < 2 * n - 1; i++) {
    dat[i] = 1e18;
  }
  return;
}
template <typename T>
void SegmentTree<T>::update(int k, T a) {
  k += n - 1;
  dat[k] = a;
  while (k > 0) {
    k = (k - 1) / 2;
    dat[k] = min(dat[k * 2 + 1], dat[k * 2 + 2]);
  }
  return;
}
template <typename T>
T SegmentTree<T>::query(int a, int b, int k, int l, int r) {
  if (r <= a || b <= l) {
    return 1e18;
  }
  if (a <= l && r <= b) {
    return dat[k];
  }
  return min(query(a, b, k * 2 + 1, l, (l + r) / 2),
             query(a, b, k * 2 + 2, (l + r) / 2, r));
}
template <typename T>
T SegmentTree<T>::query(int a, int b) {
  return query(a, b, 0, 0, n);
}
int N, E, T;
SegmentTree<long long int> st;
int x[100000 + 1];
long long int dp[100000 + 1];
int main() {
  int j;
  scanf("%d%d%d", &N, &E, &T);
  x[0] = 0;
  for (int i = 1; i <= N; i++) {
    scanf("%d", &x[i]);
  }
  dp[0] = 0;
  st.init(N);
  st.update(0, dp[0]);
  j = 0;
  for (int i = 1; i <= N; i++) {
    dp[i] = 1e18;
    for (; (x[i] - x[j + 1]) * 2 > T; j++) {
      dp[i] = min(dp[i], dp[j] + (x[i] - x[j + 1]) * 2);
    }
    dp[i] = min(dp[i], st.query(j, i) + T);
    st.update(i, dp[i]);
  }
  printf("%lld\n", dp[N] + E);
  return 0;
}
