#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, e, t;
  cin >> n >> e >> t;
  vector<long long> x(n);
  for (int i = 0; i < n; i++) cin >> x[i];
  long long ans = e - x[n - 1] + x[0];
  for (int i = 0; i < n;) {
    if (i != 0) ans += x[i] - x[i - 1];
    long long tmp = t;
    for (int j = n - 1; j >= i + 1; j--) {
      long long tmp1 = max((x[j] - x[i]) * 3, (x[j] - x[i]) + t);
      long long tmp2 = x[j] - x[i] + t * (j - i + 1);
      if (tmp1 < tmp2) {
        tmp = tmp1;
        i = j + 1;
        break;
      }
    }
    if (tmp == t) i++;
    ans += tmp;
  }
  cout << ans << endl;
  return 0;
}
