#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int nxt[N];
int t[N];
char s[N][3];
int n, c, d;
int main() {
  scanf("%d%d%d", &n, &c, &d);
  for (int i = 1; i <= n; ++i) scanf("%d%s", &t[i], s[i]);
  scanf("%d", &t[n + 1]);
  nxt[n] = n + 1;
  for (int i = n - 1; i >= 1; --i) {
    nxt[i] = (s[i][0] != s[i + 1][0] ? i + 1 : nxt[i + 1]);
  }
  long long tmp1 = 0, tmp2 = 0;
  for (int i = 1; i <= n; ++i) {
    if (i > 1 && s[i][0] != s[i - 1][0]) {
      tmp1 += (t[nxt[i]] - t[i]) * c;
    } else
      tmp1 += min((t[nxt[i]] - t[i]) * c, d);
    tmp1 = min(tmp2 + d, tmp1);
    tmp2 += d;
  }
  cout << tmp1;
}
