#include <bits/stdc++.h>
using namespace std;
int n;
long long t;
long long e;
vector<long long> x;
long long dp[100010];
long long rec(int end_x) {
  if (dp[end_x] != -1) return dp[end_x];
  if (end_x == n) {
    return (dp[end_x] = e - x[n]);
  }
  long long v = (1LL << 60);
  for (int i = end_x + 1; i <= n; i++) {
    long long d = (x[i] - x[end_x + 1]) * 2;
    d = max(d, t);
    v = min(v, rec(i) + d + (x[i] - x[end_x + 1]));
  }
  return (dp[end_x] = v + x[end_x + 1] - x[end_x]);
}
int main() {
  fill(dp, dp + 100010, -1LL);
  cin >> n >> e >> t;
  x.assign(n + 1, 0);
  x[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  cout << rec(0) << endl;
  return 0;
}
