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