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