#include <bits/stdc++.h>
using namespace std;
int n, t, e;
int loc[2005];
long long dp[2005];
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &loc[i]);
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = 1e18;
    for (int j = 0; j < i; j++) {
      dp[i] = min(dp[j] + (loc[i] - loc[j]) + max(t, 2 * (loc[i] - loc[j + 1])),
                  dp[i]);
    }
  }
  printf("%lld", dp[n] + e - loc[n]);
  return 0;
}
