#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double PI = acos(-1.0);
vector<int64_t> x, memo;
int64_t N, E, T;
int64_t solve(int64_t posindex) {
  if (posindex == N) return 0;
  if (memo[posindex] != -1) return memo[posindex];
  int64_t ans = (std::numeric_limits<int64_t>::max() / 4);
  ans = min(ans, solve(posindex + 1) + T + x[posindex + 1] - x[posindex]);
  for (int64_t i = (int64_t)(posindex + 1); i < (int64_t)(N); i++) {
    int64_t sol = solve(i + 1);
    int64_t dist = x[i] - x[posindex];
    int64_t gets = max(T + dist, dist * 3);
    int64_t res = sol + gets + x[i + 1] - x[i];
    if (ans < res) break;
    ans = res;
  }
  return ans;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N >> E >> T;
  x = vector<int64_t>(N + 1);
  memo = vector<int64_t>(N, -1);
  for (int64_t i = (int64_t)(0); i < (int64_t)(N); i++) cin >> x[i];
  x[N] = E;
  sort((x.begin()), (x.end()));
  cout << x[0] + solve(0) << endl;
  return 0;
}
