#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, c, d;
  cin >> n >> c >> d;
  vector<long long> dp(n + 1, 0);
  vector<int> t(n + 1), w(n);
  for (int i = 0; i < n; i++) {
    char ch;
    cin >> t[i] >> ch;
    w[i] = (ch == 'W');
  }
  cin >> t[n];
  int last[2];
  last[0] = last[1] = n;
  long long sum[2];
  sum[0] = sum[1] = 0;
  long long ans = d * 1ll * n;
  for (int i = n - 1; i >= 0; i--) {
    if (i < n - 1 && w[i + 1] != w[i]) sum[0] = sum[1] = 0;
    int R = (t[last[w[i] ^ 1]] - t[i]) * c;
    dp[i] = dp[last[w[i] ^ 1]] + sum[w[i]] + R;
    sum[w[i]] += min(d, R);
    ans = min(ans, d * 1ll * i + dp[i]);
    last[w[i]] = i;
  }
  cout << ans << "\n";
  return 0;
}
