#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int l, r, pl = 0, pr = 0;
  int sumt = 0;
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    sumt = sumt + p1 * (r - l);
    if (i != 0) {
      if (l - pr > (t1 + t2)) {
        sumt = sumt + t1 * p1 + t2 * p2 + (l - pr - t2 - t1) * p3;
      } else if (l - pr > t1) {
        sumt = sumt + t1 * p1 + (l - pr - t1) * p2;
      } else
        sumt = sumt + (l - pr) * p1;
    }
    pl = l;
    pr = r;
  }
  cout << sumt << endl;
  return 0;
}
