#include <bits/stdc++.h>
using namespace std;
const int M = 100005;
long long dp[M];
int P[M];
int n, e, t;
int main() {
  scanf("%d%d%d", &n, &e, &t);
  for (int i = 1; i <= n; ++i) scanf("%d", P + i);
  memset(dp, 0x3f, sizeof dp);
  dp[0] = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j)
      if (t <= 2 * (P[j] - P[i + 1]))
        dp[j] = min(dp[j], dp[i] + P[j] - P[i] + 2 * (P[j] - P[i + 1]));
      else
        dp[j] = min(dp[j], dp[i] + P[j] - P[i] + t);
  }
  printf("%lld\n", dp[n] + e - P[n]);
  return 0;
}
