#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<long long, long long> > vc;
  long long n, a, b, p1, p2, p3, t1, t2, s = 0;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  while (n--) {
    cin >> a >> b;
    vc.push_back(make_pair(a, b));
    s += (p1 * (b - a));
  }
  for (long long i = 1; i < vc.size(); i++) {
    long long c = vc[i].first - vc[i - 1].second;
    if (c <= t1) {
      s += (c * p1);
    } else {
      s += (t1 * p1);
      c -= t1;
      if (c <= t2)
        s += (c * p2);
      else {
        s += (t2 * p2);
        c -= t2;
        s += (c * p3);
      }
    }
  }
  cout << s;
  return 0;
}
