#include <bits/stdc++.h>
typedef struct Data {
  int l, t;
} data;
int n, p1, p2, p3, t1, t2;
int Judge(int temp) {
  int watt = 0;
  if (temp <= t1)
    watt += temp * p1;
  else if (temp > t1 && temp <= t2 + t1) {
    watt += p1 * t1;
    temp -= t1;
    watt += temp * p2;
  } else if (temp > t2 + t1) {
    watt += p1 * t1 + p2 * (t2);
    temp -= (t2 + t1);
    watt += temp * p3;
  }
  return watt;
}
int main() {
  int h, t;
  data time[105];
  while (scanf("%d", &n) != EOF) {
    scanf("%d%d%d%d%d", &p1, &p2, &p3, &t1, &t2);
    int watt = 0;
    for (int i = 0; i < n; ++i) scanf("%d%d", &time[i].l, &time[i].t);
    for (int i = 0; i < n; ++i) {
      int temp = time[i].t - time[i].l;
      int temp2 = time[i + 1].l - time[i].t;
      watt += temp * p1;
      if (i < n - 1) watt += Judge(temp2);
    }
    printf("%d\n", watt);
  }
  return 0;
}
