#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000 + 7;
const long long LINF = INF * (long long)INF;
long long dp[100001];
int N, E, T;
int a[100001];
int opt = 0;
long long cost(int i, int opt) {
  long long prev = 0;
  if (opt - 1 >= 0) prev = dp[opt - 1];
  long long cur = (a[i] - a[opt]) * 2;
  if (T > (a[i] - a[opt]) * 2) {
    cur = T + (a[i] - a[opt]);
  }
  return prev + cur;
}
int main() {
  scanf("%d %d %d", &N, &E, &T);
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  dp[0] = T;
  for (int i = 1; i < N; i++) {
    dp[i] = LINF;
    for (int j = 0; j <= i; j++) dp[i] = min(dp[i], cost(i, j));
  }
  cout << dp[N - 1] + E;
}
