#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  vector<pair<int, int>> work_periods;
  for (int i = 0; i < n; i++) {
    pair<int, int> p;
    cin >> p.first >> p.second;
    work_periods.push_back(p);
  }
  int total_watt = (work_periods[0].second - work_periods[0].first) * p1;
  for (int i = 1; i < work_periods.size(); i++) {
    total_watt += (work_periods[i].second - work_periods[i].first) * p1;
    total_watt +=
        min(work_periods[i].first - work_periods[i - 1].second, t1) * p1;
    total_watt +=
        min(max(work_periods[i].first - work_periods[i - 1].second - t1, 0),
            t2) *
        p2;
    total_watt +=
        max(work_periods[i].first - work_periods[i - 1].second - t1 - t2, 0) *
        p3;
  }
  cout << total_watt << endl;
  return 0;
}
