#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, c, d;
int t[maxn];
string p[maxn];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> c >> d;
  for (int i = 1; i <= n; i++) cin >> t[i] >> p[i];
  cin >> t[n + 1];
  long long ans = 1LL * d * n, sum = 0;
  for (int i = n, last = -1; i; --i) {
    if (p[i] == p[i + 1]) {
      sum += min(d, c * (last - t[i + 1]));
    } else {
      last = t[i + 1];
    }
    ans = min(ans,
              sum + (long long)c * (t[n + 1] - t[i]) + (long long)d * (i - 1));
  }
  cout << ans << '\n';
}
