#include <bits/stdc++.h>
using namespace std;
int main() {
  int p1, p2, p3, t1, t2, n, k1 = 0, k2, k3 = 0;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int n1 = n;
  int inp[n * 2];
  for (int i = 0; i < n * 2; i++) {
    cin >> inp[i];
  }
  for (int i = 1; i <= (n * 2) - 1; i += 2) {
    k1 += p1 * (inp[i] - inp[i - 1]);
  }
  if (n > 1) {
    for (int i = 2; i < (n * 2) - 1; i += 2) {
      k2 = inp[i] - inp[i - 1];
      if (k2 > 0 && k2 <= t1)
        k1 += p1 * k2;
      else if (k2 > t1 && k2 <= (t1 + t2))
        k1 += ((p1 * t1) + (p2 * (k2 - t1)));
      else if (k2 > (t1 + t2))
        k1 += ((p1 * t1) + (p2 * t2) + (p3 * (k2 - (t1 + t2))));
    }
  }
  cout << k1 << endl;
}
