#include <bits/stdc++.h>
using namespace std;
struct intervalTime {
  int start, end;
};
int main() {
  int n, p1, p2, p3, t1, t2, temp, sumPower = 0, distance[99];
  intervalTime time[100];
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  for (int i = 0; i < n; i++) {
    cin >> time[i].start >> time[i].end;
  }
  for (int i = 0; i < n - 1; i++) {
    distance[i] = time[i + 1].start - time[i].end;
    if (distance[i] > t1) {
      if (distance[i] - t1 > t2) {
        sumPower += t1 * p1 + t2 * p2 + (distance[i] - t1 - t2) * p3;
      } else {
        sumPower += t1 * p1 + (distance[i] - t1) * p2;
      }
    } else {
      sumPower += distance[i] * p1;
    }
  }
  for (int i = 0; i < n; i++) {
    sumPower += (time[i].end - time[i].start) * p1;
  }
  cout << sumPower;
  return 0;
}
