#include <bits/stdc++.h>
using namespace std;
int res, n, p1, p2, p3, t1, t2, l, r, last, temp;
int main() {
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2 >> l >> r;
  last = r;
  res += p1 * (r - l);
  for (int i = 1; i < n; i++) {
    cin >> l >> r;
    res += (r - l) * p1;
    temp = l - last;
    res += min(temp, t1) * p1;
    temp = max(0, temp - t1);
    res += min(temp, t2) * p2;
    temp = max(0, temp - t2);
    res += temp * p3;
    last = r;
  }
  cout << res;
}
