#include <bits/stdc++.h>
int main() {
  int N, P1, P2, P3, T1, T2;
  scanf("%d %d %d %d %d %d", &N, &P1, &P2, &P3, &T1, &T2);
  int x1, y1, x2, y2;
  scanf("%d %d", &x1, &y1);
  int res = (y1 - x1) * P1;
  int i;
  for (i = 1; i < N; i++) {
    scanf("%d %d", &x2, &y2);
    int t = x2 - y1;
    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 += (y2 - x2) * P1;
    x1 = x2;
    y1 = y2;
  }
  printf("%d\n", res);
  return 0;
}
