#include <bits/stdc++.h>
using namespace std;
struct rec {
  int l, r;
};
int main() {
  int i, p1, p2, p3, t1, t2, n, b;
  long r;
  rec mas[101];
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  for (i = 0; i < n; i++) cin >> mas[i].l >> mas[i].r;
  r = 0;
  for (i = 0; i < n; i++) r += (mas[i].r - mas[i].l) * p1;
  for (i = 0; i < n - 1; i++) {
    b = mas[i + 1].l - mas[i].r;
    if (b <= t1) r += b * p1;
    if (b > t1 && b <= (t1 + t2)) r += t1 * p1 + (b - t1) * p2;
    if (b > (t1 + t2)) r += t1 * p1 + t2 * p2 + (b - t1 - t2) * p3;
  }
  cout << r;
  return 0;
}
