#include <bits/stdc++.h>
using namespace std;
int a[100 + 10];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int p1, p2, p3, t1, t2;
    scanf("%d%d%d%d%d", &p1, &p2, &p3, &t1, &t2);
    int ans = 0;
    int temp, len = 0;
    for (int i = 1; i <= n; i++) {
      int x, y;
      scanf("%d%d", &x, &y);
      ans += (y - x) * p1;
      if (i > 1) {
        a[len++] = x - temp;
      }
      temp = y;
    }
    for (int i = 0; i < len; i++) {
      if (a[i] < t1) {
        ans += a[i] * p1;
      } else if (a[i] < t1 + t2) {
        ans += t1 * p1 + (a[i] - t1) * p2;
      } else {
        ans += t1 * p1 + t2 * p2 + (a[i] - t1 - t2) * p3;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
