#include <bits/stdc++.h>
template <typename T>
inline void check_min(T a, T &b) {
  if (a < b) b = a;
}
template <typename T>
inline void read(T &x) {
  char c = x = 0;
  for (c = getchar(); !isdigit(c); c = getchar())
    ;
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + (c ^ 48);
}
namespace bf {
const int N = 2010;
const long long INF = 9223372036854775807ll;
int a[N], b[N];
int n, m;
long long ans;
void initialize() {
  read(n), read(a[n]), read(m);
  for (int i = 0; i < n; i++) read(a[i]);
  for (int i = 1; i <= n; i++) b[i] = a[i] - a[i - 1];
}
inline long long get_dis(int i, int j) { return a[j] - b[j] - a[i]; }
void solve() {
  initialize();
  ans = a[n];
  for (int i = 1, j; i <= n; i = j + 1) {
    for (j = i; j < n && get_dis(i, j + 1) * 2 <= m; j++)
      ;
    ans += m;
  }
  printf("%lld\n", ans);
}
}  // namespace bf
int main() {
  bf::solve();
  return 0;
}
