#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int sum = 0;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    v.push_back(make_pair(a, b));
  }
  int i = 0;
  while (i < n - 1) {
    int d1 = v[i].second - v[i].first;
    sum += d1 * p1;
    int d2 = v[i + 1].first - v[i].second;
    if (d2 >= t1) {
      sum += t1 * p1;
      if (d2 - t1 >= t2) {
        sum += t2 * p2;
      } else {
        sum += (d2 - t1) * p2;
      }
      if (d2 >= t1 + t2) {
        sum += (d2 - (t1 + t2)) * p3;
      }
    } else
      sum += d2 * p1;
    i++;
  }
  int d = v[n - 1].second - v[n - 1].first;
  sum += d * p1;
  cout << sum;
}
