#include <bits/stdc++.h>
using namespace std;
int num[100005], kind[100005];
int main() {
  int n;
  long long a, b;
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    char str[5];
    cin >> num[i] >> str;
    kind[i] = (str[0] == 'P');
  }
  cin >> num[n + 1];
  kind[n + 1] = -1;
  long long ans = b * n, s = 0;
  int last2 = num[n + 1];
  for (int i = n; i > 0; i--) {
    if (kind[i] == kind[i + 1])
      s += min(a * (last2 - num[i + 1]), b);
    else {
      s += a * (last2 - num[i + 1]);
      last2 = num[i + 1];
    }
    ans = min(ans, s + a * (last2 - num[i]) + b * (i - 1));
  }
  cout << ans;
  return 0;
}
