#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, d, e, l, r, s, t, p;
int main() {
  cin >> n >> a >> b >> c >> d >> e;
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    t = l - s;
    if (i > 0)
      p += (t <= d ? t * a
                   : (d * a +
                      (t - d <= e ? (t - d) * b : (e * b + (t - d - e) * c))));
    p += (r - l) * a;
    s = r;
  }
  cout << p;
  return 0;
}
