#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int l[n], r[n];
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum = sum + p1 * (r[i] - l[i]);
    if (i != n - 1) {
      if (t1 <= (l[i + 1] - r[i])) {
        sum += (t1 * p1);
        if (t2 <= l[i + 1] - (r[i] + t1)) {
          sum += (t2 * p2);
          if (l[i + 1] > (r[i] + t1 + t2))
            sum += (p3 * (l[i + 1] - r[i] - t1 - t2));
        } else
          sum += (p2 * (l[i + 1] - r[i] - t1));
      } else
        sum += (p1 * (l[i + 1] - r[i]));
    }
  }
  cout << sum << endl;
}
