#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void checkMax(T &a, const T &b) {
  if (a < b) a = b;
}
template <class T>
inline void checkMin(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
inline string toString(const T &n) {
  ostringstream out;
  out << n;
  out.flush();
  return out.str();
}
template <class T>
inline T toValue(const string &s) {
  T x;
  istringstream in(s);
  in >> x;
  return x;
}
bool havaNextTestData() {
  char c;
  if (scanf(" %c", &c) == EOF) return false;
  ungetc(c, stdin);
  return true;
}
int dx[] = {0, 0, -1, 1, -1, 1, -1, 1};
int dy[] = {-1, 1, 0, 0, -1, -1, 1, 1};
string dir[] = {"L", "R", "U", "D", "LU", "LD", "RU", "RD"};
void solve(const int &caseID) {
  int n;
  int P1, P2, P3, T1, T2;
  scanf("%d", &n);
  scanf("%d %d %d %d %d", &P1, &P2, &P3, &T1, &T2);
  int pl, pr;
  scanf("%d %d", &pl, &pr);
  int ans = (pr - pl) * P1;
  for (int i = 1; i < n; i++) {
    int nl, nr;
    cin >> nl >> nr;
    int t = nl - pr;
    if (t >= T1) {
      ans += P1 * T1;
      t -= T1;
      if (t >= T2) {
        ans += P2 * T2;
        t -= T2;
        ans += P3 * t;
      } else {
        ans += P2 * t;
      }
    } else
      ans += P1 * t;
    ans += (nr - nl) * P1;
    pl = nl;
    pr = nr;
  }
  cout << ans << endl;
}
int main() {
  ;
  int caseID = 0;
  while (havaNextTestData()) solve(++caseID);
  return 0;
}
