#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, P1, P2, P3, T1, T2;
  cin >> n >> P1 >> P2 >> P3 >> T1 >> T2;
  int ans = 0;
  int lastR;
  for (int i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    if (i != 0) {
      ans += min(T1, l - lastR) * P1;
      ans += max(0, l - lastR - T1) * P2;
      ans += max(0, l - lastR - T1 - T2) * (P3 - P2);
    }
    ans += (r - l) * P1;
    lastR = r;
  }
  cout << ans;
  return 0;
}
