#include <bits/stdc++.h>
int main(void) {
  int n, p1, p2, p3, t1, t2;
  int l, r, w = 0;
  int now = 0;
  scanf("%d %d %d %d %d %d", &n, &p1, &p2, &p3, &t1, &t2);
  scanf("%d %d", &l, &r);
  w += p1 * (r - l);
  now = r;
  for (; n > 1; n--) {
    scanf("%d %d", &l, &r);
    if ((l - now) > (t1 + t2)) {
      w += p1 * (t1 + r - l);
      w += p2 * (t2);
      w += p3 * (l - now - t1 - t2);
      now = r;
    } else if ((l - now) > t1) {
      w += p1 * (t1 + r - l);
      w += p2 * (l - now - t1);
      now = r;
    } else {
      w += p1 * (r - now);
      now = r;
    }
  }
  printf("%d\n", w);
  return 0;
}
