#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, p1, p2, p3, t1, t2, i, s1 = 0, s2 = 0, s3 = 0;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  vector<long long> l(n);
  vector<long long> r(n);
  for (i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    s1 += r[i] - l[i];
  }
  for (i = 0; i < n - 1; i++) {
    s1 += min(t1, l[i + 1] - r[i]);
    if (l[i + 1] - r[i] - t1 >= 0) {
      s2 += min(t2, l[i + 1] - r[i] - t1);
    }
    if (l[i + 1] - r[i] - t1 - t2 > 0) {
      s3 += l[i + 1] - r[i] - t1 - t2;
    }
  }
  cout << s1 * p1 + s2 * p2 + s3 * p3;
}
