#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int sum = 0;
  int a[n][2];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 2; j++) cin >> a[i][j];
  }
  int x = 0;
  sum = p1 * abs(a[0][1] - a[0][0]);
  x++;
  while (x < n) {
    int p = abs(a[x][0] - a[x - 1][1]);
    if (p > t1) {
      sum += t1 * p1;
      p = (p - t1);
      if (p > 0) {
        if (p > t2) {
          p = p - t2;
          sum += t2 * p2;
          if (p > 0) {
            sum += p * p3;
          }
        } else {
          sum += p * p2;
          p = 0;
        }
      }
    } else
      sum += p * p1;
    int q = abs(a[x][1] - a[x][0]);
    sum += q * p1;
    x++;
  }
  cout << sum;
}
