#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 6;
int n, c, d, lt;
long long ans, now;
struct man {
  int t, p;
} a[N];
int nx[N][2];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> c >> d;
  for (int i = 1; i <= n; ++i) {
    int t;
    char s[5];
    cin >> t >> s;
    a[i] = (man){t, *s == 'W'};
  }
  cin >> lt;
  nx[n][0] = nx[n][1] = lt;
  for (int i = n - 1; i; --i) {
    nx[i][0] = nx[i + 1][0];
    nx[i][1] = nx[i + 1][1];
    nx[i][a[i + 1].p] = a[i + 1].t;
  }
  ans = now = (long long)n * d;
  for (int i = n; i; --i) {
    now -= d;
    ans = min(ans, now + (long long)c * (lt - a[i].t));
    if (a[i].p == a[i - 1].p)
      now += min((long long)d, (long long)c * (nx[i][!a[i].p] - a[i].t));
  }
  cout << ans << '\n';
  return 0;
}
