#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
long long a[maxn];
char op[maxn];
int main() {
  int n;
  long long d, c;
  cin >> n >> c >> d;
  for (int i = 1; i <= n; i++) cin >> a[i] >> op[i];
  cin >> a[n + 1];
  int last = a[n + 1];
  long long ans = n * d, s = 0;
  for (int i = n; i >= 1; i--) {
    if (i == n || op[i] == op[i + 1]) {
      s += min(d, (last - a[i + 1]) * c);
    } else {
      last = a[i + 1];
    }
    ans = min(ans, (i - 1) * d + s + (a[n + 1] - a[i]) * c);
  }
  cout << ans << endl;
}
