#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
long long t[maxn], n, c, d, ans;
char str[maxn][8];
int main(void) {
  scanf("%lld%lld%lld", &n, &c, &d);
  for (int i = 1; i <= n; i++) scanf("%lld%s", &t[i], str[i]);
  scanf("%lld", &t[n + 1]);
  ans = n * d;
  long long get = t[n + 1];
  long long res = 0;
  for (int i = n; i >= 1; i--) {
    if (str[i][0] == str[i + 1][0]) {
      res = res + min(d, c * (get - t[i + 1]));
      if (c * (get - t[i]) >= d) continue;
    } else {
      get = t[i + 1];
      if (c * (get - t[i]) >= d) continue;
    }
    ans = min(ans, c * (t[n + 1] - t[i]) + res + d * (i - 1));
  }
  printf("%lld\n", ans);
}
