#include <bits/stdc++.h>
using namespace std;
struct Laptop {
  int _n, _P1, _P2, _P3, _T1, _T2;
};
struct Period {
  int _l, _r;
};
int AmoutPeriodConsumed(Laptop& l, int time) {
  int amount = 0;
  if (time > l._T1) {
    if ((time - l._T1) > l._T2) {
      amount += (time - l._T1 - l._T2) * l._P3;
      time = l._T1 + l._T2;
    }
    amount += (time - l._T1) * l._P2;
    time = l._T1;
  }
  return (amount + time * l._P1);
}
int TotalAmountOfPowerConsumed(Laptop& l, Period arr[]) {
  if (l._n < 1) {
    return 0;
  }
  int total = 0;
  for (int i = 0; i < (l._n - 1); i++) {
    total += (arr[i]._r - arr[i]._l) * l._P1 +
             AmoutPeriodConsumed(l, arr[i + 1]._l - arr[i]._r);
  }
  return (total + (arr[l._n - 1]._r - arr[l._n - 1]._l) * l._P1);
}
int main() {
  Laptop l;
  Period arr[1000];
  cin >> l._n >> l._P1 >> l._P2 >> l._P3 >> l._T1 >> l._T2;
  for (int i = 0; i < l._n; i++) {
    cin >> arr[i]._l >> arr[i]._r;
  }
  cout << TotalAmountOfPowerConsumed(l, arr);
}
