#include <bits/stdc++.h>
int main() {
  int n, p1, p2, p3, t1, t2;
  while (~scanf("%d%d%d%d%d%d", &n, &p1, &p2, &p3, &t1, &t2)) {
    int i, l[105], r[105], sp1 = 0, sp2 = 0, tt;
    for (i = 1; i <= n; i++) {
      scanf("%d%d", &l[i], &r[i]);
      sp1 += (r[i] - l[i]) * p1;
    }
    for (i = 1; i < n; i++) {
      tt = l[i + 1] - r[i];
      if (tt <= t1)
        sp2 += (tt * p1);
      else if (t1 < tt && tt < t1 + t2)
        sp2 += (t1 * p1 + (tt - t1) * p2);
      else
        sp2 += (t1 * p1 + t2 * p2 + (tt - t1 - t2) * p3);
    }
    printf("%d\n", sp1 + sp2);
  }
  return 0;
}
