#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2, ans = 0;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int oldx = 0, oldy = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (i > 0) {
      if (x - oldy <= t1) {
        ans += (x - oldy) * p1;
      } else if (x - oldy <= t1 + t2) {
        ans += t1 * p1;
        ans += ((x - oldy) - t1) * p2;
      } else {
        ans += t1 * p1;
        ans += t2 * p2;
        ans += (((x - oldy) - t1) - t2) * p3;
      }
    }
    ans += (y - x) * p1;
    oldx = x;
    oldy = y;
  }
  cout << ans;
  return 0;
}
