#include <bits/stdc++.h>
using namespace std;
int n, p1, p2, p3, t1, t2;
int main() {
  scanf("%d%d%d%d%d%d", &n, &p1, &p2, &p3, &t1, &t2);
  int ans = 0;
  int l, r;
  int oldr;
  scanf("%d%d", &l, &r);
  ans += (r - l) * p1;
  for (int i = 1; i < n; ++i) {
    oldr = r;
    scanf("%d%d", &l, &r);
    if (l - oldr <= t1)
      ans += (l - oldr) * p1;
    else if (l - oldr <= t1 + t2)
      ans += t1 * p1 + (l - oldr - t1) * p2;
    else
      ans += t1 * p1 + t2 * p2 + (l - oldr - t1 - t2) * p3;
    ans += (r - l) * p1;
  }
  printf("%d\n", ans);
  return 0;
}
