#include <bits/stdc++.h>
using namespace std;
int p1, p2, p3;
int t1, t2;
int n;
int main() {
  cin >> n;
  cin >> p1 >> p2 >> p3;
  cin >> t1 >> t2;
  int prev = 0;
  int res = 0;
  for (int i = 0; i < n; ++i) {
    int l, r;
    cin >> l >> r;
    if (i > 0) {
      res += max(0, min(l - prev, t1)) * p1;
      prev += t1;
      res += max(0, min(l - prev, t2)) * p2;
      prev += t2;
      res += max(l - prev, 0) * p3;
    }
    res += (r - l) * p1;
    prev = r;
  }
  cout << res;
  return 0;
}
