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