#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline int ty() {
  int a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
inline int tc() {
  int c = fetch();
  while (c <= 32 && c != EOF) c = fetch();
  return c;
}
}  // namespace ae86
using ae86::tc;
using ae86::ty;
const int _ = 100007;
const long long linf = 0x3f3f3f3f3f3f3f3f;
int n, tim[_], who[_];
long long cp, pp;
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  n = ty(), cp = ty(), pp = ty();
  for (int i = 0; i < n; i++) tim[i] = ty(), who[i] = tc();
  tim[n] = ty(), who[n] = 0;
  long long ans = pp * n;
  long long sval = 0;
  for (int i = n - 1, las = tim[n]; i >= 0; i--) {
    if (who[i] == who[i + 1])
      sval += min(cp * (las - tim[i + 1]), pp);
    else
      las = tim[i + 1];
    ans = min(ans, cp * (tim[n] - tim[i]) + sval + pp * i);
  }
  cout << ans << lf;
  return 0;
}
