#include <bits/stdc++.h>
using namespace std;
using ull = uint64_t;
using ll = int64_t;
using ld = long double;
const int N = 100228;
char tp[N];
ll a[N];
ll f[N];
const ll INF = (1ll << 60);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.setf(ios::fixed);
  cout.precision(20);
  int n;
  ll c, d;
  cin >> n >> c >> d;
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> tp[i];
  }
  cin >> a[n];
  tp[n] = 'X';
  ll ans = d * n;
  ll s = 0;
  ll last = a[n];
  for (int i = n - 1; i >= 0; --i) {
    if (tp[i] == tp[i + 1]) {
      s += min(d, (last - a[i + 1]) * c);
    } else {
      last = a[i + 1];
    }
    ans = min(ans, c * (a[n] - a[i]) + s + d * i);
  }
  cout << ans << "\n";
}
