#include <bits/stdc++.h>
using namespace std;
int n, t1, t2, p1, p2, p3, s, e, pe, t;
long long c;
int main() {
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  cin >> s >> e;
  pe = e;
  c = (e - s) * p1;
  while (--n) {
    cin >> s >> e;
    c += (e - s) * p1;
    t = s - pe;
    if (t > 0) {
      c += min(t, t1) * p1;
      t -= t1;
    }
    if (t > 0) {
      c += min(t, t2) * p2;
      t -= t2;
    }
    if (t > 0) {
      c += t * p3;
    }
    pe = e;
  }
  cout << c;
}
