#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int n, p1, p2, p3, t1, t2, l, r, res = 0, l1, r1;
int main() {
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    if (i != 0) {
      if (l - r1 >= t1) res += p1 * t1;
      if (l - r1 < t1) {
        res += p1 * (l - r1);
        goto a;
      }
      if (l - r1 >= t1 + t2) res += p2 * t2, res += p3 * (l - r1 - t1 - t2);
      if (l - r1 < t1 + t2) res += p2 * (l - r1 - t1);
    }
  a:
    res += p1 * (r - l);
    l1 = l, r1 = r;
  }
  cout << res;
  return 0;
}
