#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, P1, P2, P3, T1, T2;
  cin >> n >> P1 >> P2 >> P3 >> T1 >> T2;
  int a, b, c, d1, r = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (i) {
      int d = a - d1;
      if (d > 0) {
        if (d > T1) {
          r = r + T1 * P1;
          d = d - T1;
        } else {
          r = r + d * P1;
          d = d - T1;
        }
      }
      if (d > 0) {
        if (d > T2) {
          r = r + T2 * P2;
          d = d - T2;
        } else {
          r = r + d * P2;
          d = d - T2;
        }
      }
      if (d > 0) r = r + d * P3;
    }
    r = r + (b - a) * P1;
    c = a;
    d1 = b;
  }
  cout << r;
  return 0;
}
