#include <bits/stdc++.h>
int main() {
  int n, p1, p2, p3, t1, t2;
  int table[100][2];
  int sum = 0;
  scanf("%d%d%d%d%d%d", &n, &p1, &p2, &p3, &t1, &t2);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 2; j++) {
      scanf("%d", &table[i][j]);
    }
  }
  for (int i = 0; i < n; i++) {
    sum += p1 * (table[i][1] - table[i][0]);
  }
  for (int i = 0; i < n - 1; i++) {
    if (table[i + 1][0] - table[i][1] <= t1) {
      sum += p1 * (table[i + 1][0] - table[i][1]);
    } else if (table[i + 1][0] - table[i][1] <= t1 + t2) {
      sum += p1 * t1 + p2 * (table[i + 1][0] - table[i][1] - t1);
    } else if (table[i + 1][0] - table[i][1] > t1 + t2) {
      sum += p1 * t1 + p2 * t2 + p3 * (table[i + 1][0] - table[i][1] - t1 - t2);
    }
  }
  printf("%d", sum);
  return 0;
}
