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