#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, a[N], type[N];
long long c, d, ans, cnt;
int main() {
  scanf("%d%lld%lld", &n, &c, &d);
  for (int i = 1; i <= n; ++i) {
    char opt[5];
    scanf("%d%s", &a[i], opt);
    type[i] = (opt[0] == 'W');
  }
  scanf("%d", &a[n + 1]);
  ans = d * n;
  type[n + 1] = -1;
  for (int i = n, pre; i >= 1; --i) {
    if (type[i] == type[i + 1])
      cnt += min(d, c * (pre - a[i + 1]));
    else
      pre = a[i + 1];
    ans = min(ans, cnt + c * (a[n + 1] - a[i]) + d * (i - 1));
  }
  printf("%lld", ans);
  return 0;
}
