#include <bits/stdc++.h>
using namespace std;
long long n;
long long t, e;
long long a[100100];
int use[100100];
int main() {
  scanf("%lld %lld %lld", &n, &e, &t);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  long long ans = 0;
  long long rt = 0;
  for (int i = n - 1; i >= 1; i--) {
    int d = 0;
    rt = 0;
    if (use[i] == 0)
      for (int j = 0; i - j - 1 >= 0; j++) {
        d = 0;
        if (a[i - j] - a[i - j - 1] < t) {
          d = 1;
          use[i - j - 1] = 1;
          rt += a[i - j] - a[i - j - 1];
        } else {
          rt *= 2;
          ans += rt;
          if (t > rt) {
            ans += (j + 1) * (t - rt);
          }
          rt = 0;
          break;
        }
        if (d == 1 && i - j - 1 == 0) {
          rt *= 2;
          ans += rt;
          if (t > rt) {
            ans += (j + 1) * (t - rt);
          }
          rt = 0;
        }
      }
    use[i] = 1;
  }
  if (use[0] == 0) {
    ans += t;
  }
  ans += e;
  printf("%lld", ans);
}
