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