#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  long long int ans = 0;
  int rem = 0;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    ans += (b - a) * p1;
    if (i > 0) {
      int etc = a - rem;
      if (etc > t1) {
        ans += t1 * p1;
        etc -= t1;
        if (etc > t2) {
          ans += t2 * p2;
          etc -= t2;
          ans += etc * p3;
        } else
          ans += etc * p2;
      } else
        ans += etc * p1;
    }
    rem = b;
  }
  cout << ans;
  return 0;
}
