#include <bits/stdc++.h>
using namespace std;
vector<string> A(8, "");
int main() {
  int n, p1, p2, p3, t1, t2, t3;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int l, r, tl, tr, res = 0;
  cin >> l >> r;
  res += (r - l) * p1;
  for (int i = 0; i < n - 1; i++) {
    cin >> tl >> tr;
    int t = tl - r;
    int c = 0;
    if (t <= t1) {
      res += t * p1;
    } else if (t <= t1 + t2) {
      res += t1 * p1 + (t - t1) * p2;
    } else {
      res += t1 * p1 + t2 * p2 + (t - (t1 + t2)) * p3;
    }
    res += (tr - tl) * p1;
    l = tl;
    r = tr;
  }
  cout << res << endl;
  cin >> n;
  return 0;
}
