#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int l[n], r[n];
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    ans += (r[i] - l[i]) * p1;
  }
  for (int i = 1; i < n; i++) {
    int t = l[i] - r[i - 1];
    if (t <= t1) {
      ans += t * p1;
    } else {
      ans += t1 * p1;
      int rest = t - t1;
      if (rest <= t2) {
        ans += rest * p2;
      } else {
        ans += t2 * p2;
        ans += (rest - t2) * p3;
      }
    }
  }
  cout << ans;
  return 0;
}
