#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline char smax(A &a, const B &b) {
  return a < b ? a = b, 1 : 0;
}
template <typename A, typename B>
inline char smin(A &a, const B &b) {
  return b < a ? a = b, 1 : 0;
}
template <typename I>
inline void read(I &x) {
  int f = 0, c;
  while (!isdigit(c = getchar())) c == '-' ? f = 1 : 0;
  x = c & 15;
  while (isdigit(c = getchar())) x = (x << 1) + (x << 3) + (c & 15);
  f ? x = -x : 0;
}
const int N = 1e5 + 7;
int n, c, d;
int t[N], opt[N];
inline void work() {
  long long ans = 0x7fffffffffffffff;
  int pre = t[n + 1];
  long long ss = 0;
  for (int i = n + 1; i; --i) {
    smin(ans, (i - 1ll) * d + (long long)(t[n + 1] - t[i]) * c + ss);
    if (i == n + 1) continue;
    if (opt[i] == opt[i - 1]) {
      long long t1 = (long long)(pre - t[i]) * c;
      if (t1 < d)
        ss += t1;
      else
        ss += d;
    } else
      pre = t[i];
  }
  printf("%I64d\n", ans);
}
inline void init() {
  read(n), read(c), read(d);
  for (int i = 1; i <= n; ++i) {
    read(t[i]);
    char c;
    while (!isalpha(c = getchar()))
      ;
    opt[i] = c;
  }
  read(t[n + 1]);
}
int main() {
  init();
  work();
  fclose(stdin), fclose(stdout);
  return 0;
}
