#include <bits/stdc++.h>
struct {
  int head;
  int last;
} f[101];
int main() {
  int n, p1, p2, p3, t1, t2, s, i, t;
  while (scanf("%d %d %d %d %d %d", &n, &p1, &p2, &p3, &t1, &t2) != EOF) {
    for (i = 1; i <= n; i++) {
      scanf("%d %d", &f[i].head, &f[i].last);
    }
    s = 0;
    for (i = 1; i <= n; i++) {
      if (i > 1) {
        t = f[i].head - f[i - 1].last;
        if (t <= t1) {
          s = s + t * p1;
        } else {
          if (t - t1 <= t2) {
            s = s + t1 * p1 + (t - t1) * p2;
          } else {
            s = s + t1 * p1 + t2 * p2 + (t - t1 - t2) * p3;
          }
        }
      }
      s = s + (f[i].last - f[i].head) * p1;
    }
    printf("%d\n", s);
  }
  return 0;
}
