#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
template <typename T>
bool cmax(T &a, T b) {
  return (a < b) ? a = b, 1 : 0;
}
template <typename T>
bool cmin(T &a, T b) {
  return (a > b) ? a = b, 1 : 0;
}
template <typename T>
T read() {
  T ans = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (isdigit(ch))
    ans = (ans << 3) + (ans << 1) + (ch - '0'), ch = getchar();
  return ans * f;
}
template <typename T>
void write(T x, char y) {
  if (x == 0) {
    putchar('0'), putchar(y);
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  static char wr[20];
  int top = 0;
  for (; x; x /= 10) wr[++top] = x % 10 + '0';
  while (top) putchar(wr[top--]);
  putchar(y);
}
void file() {}
int n, E, T;
int p[N];
void input() {
  n = read<int>(), E = read<int>(), T = read<int>();
  for (register int i = (int)1; i <= (int)n; ++i) p[i] = read<int>();
}
const long long inf = 1e18;
long long dp[N];
void work() {
  int now = 0;
  long long Min;
  for (register int i = (int)1; i <= (int)n; ++i) {
    dp[i] = dp[i - 1] + T;
    Min = inf;
    while (T <= 2 * (p[i] - p[now + 1])) {
      cmin(Min, dp[now] - 2 * p[now + 1]);
      now++;
    }
    cmin(dp[i], Min + 2 * p[i]);
  }
  write(dp[n] + E, '\n');
}
int main() {
  input();
  work();
  return 0;
}
