#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, P1, P2, P3, T1, T2, ans = 0, l1, r1;
  cin >> n >> P1 >> P2 >> P3 >> T1 >> T2;
  cin >> l1 >> r1;
  ans += (r1 - l1) * P1;
  while (n-- > 1) {
    int l2, r2;
    cin >> l2 >> r2;
    ans += (r2 - l2) * P1;
    int gap = l2 - r1;
    if (gap >= T1) {
      ans += T1 * P1;
      gap -= T1;
    } else {
      ans += gap * P1;
      gap = 0;
    }
    if (gap >= T2) {
      ans += T2 * P2;
      gap -= T2;
    } else {
      ans += gap * P2;
      gap = 0;
    }
    ans += gap * P3;
    l1 = l2;
    r1 = r2;
  }
  cout << ans;
  return 0;
}
