#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long c, d;
  cin >> n >> c >> d;
  vector<int> t(n + 1);
  vector<char> op(n);
  for (int i = 0; i < n; ++i) {
    cin >> t[i] >> op[i];
  }
  cin >> t[n];
  int dist = d / c;
  long long res = d * n;
  vector<long long> dp(n + 1);
  dp[n] = 0;
  for (int i = n - 1; i >= 0;) {
    int j = i;
    while (j >= 0 && op[i] == op[j]) --j;
    ++j;
    long long sum = 0;
    long long sum2 = 0;
    for (int k = i; k >= j; --k) {
      dp[k] = sum + sum2 + c * (t[i + 1] - t[k]) + dp[i + 1];
      if (t[i + 1] - t[k] > dist)
        sum += d;
      else
        sum2 += c * (t[i + 1] - t[k]);
      res = min(res, dp[k] + d * k);
    }
    i = j - 1;
  }
  cout << res << endl;
  return 0;
}
