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