#include <bits/stdc++.h>
#pragma GCC optimize "-O3"
using namespace std;
const int MAXN = 120000;
int n;
long long c, d;
long long t[MAXN];
int tp[MAXN];
int nx[MAXN];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> c >> d;
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
    char c;
    cin >> c;
    if (c == 'W')
      tp[i] = 0;
    else
      tp[i] = 1;
  }
  cin >> t[n];
  tp[n] = 2;
  for (int i = n - 1; i >= 0; --i) {
    if (tp[i] != tp[i + 1])
      nx[i] = i + 1;
    else
      nx[i] = nx[i + 1];
  }
  long long ans = d * n;
  long long cur = 0;
  for (int i = n - 1; i >= 0; --i) {
    if (tp[i + 1] == tp[i]) cur += min(d, (t[nx[i + 1]] - t[i + 1]) * c);
    ans = min(ans, i * d + cur + (t[n] - t[i]) * c);
  }
  cout << ans << "\n";
  return 0;
}
