#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 101000;
long long t[MAX_N];
int dp[MAX_N];
int k[MAX_N];
char kind[MAX_N];
char s[3];
int main(void) {
  long long n, c, d, i;
  scanf("%lld%lld%lld", &n, &c, &d);
  for (i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
    scanf("%s", s);
    kind[i] = s[0];
  }
  scanf("%lld", &t[n + 1]);
  for (i = n; i >= 1; i--) {
    if (kind[i] != kind[i + 1])
      dp[i] = i + 1;
    else
      dp[i] = dp[i + 1];
  }
  for (i = 1; i <= n; i++) {
    if (dp[i - 1] == i)
      k[i] = 0;
    else if ((t[dp[i]] - t[i]) * c <= d)
      k[i] = 1;
    else
      k[i] = 2;
  }
  long long res = n * d;
  long long ans = 0;
  for (i = n; i >= 1; i--) {
    res = min(res, (i - 1) * d + (t[n + 1] - t[i]) * c + ans);
    if (k[i] == 1)
      ans += (t[dp[i]] - t[i]) * c;
    else if (k[i] == 2)
      ans += d;
  }
  cout << res << "\n";
}
