#include <bits/stdc++.h>
using namespace std;
int tot, p1, p2, p3, t1, t2, n, xx, yy, x, y;
int check(int w) {
  int tot = 0;
  tot += min(w, t1) * p1, w -= t1;
  if (w > 0) tot += min(w, t2) * p2, w -= t2;
  if (w > 0) tot += w * p3;
  return tot;
}
int main() {
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  cin >> xx >> yy;
  tot += (yy - xx) * p1;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    tot += check(x - yy) + (y - x) * p1;
    xx = x, yy = y;
  }
  cout << tot << endl;
  return 0;
}
