#include <bits/stdc++.h>
using namespace std;
int p[3], t[2], n, l[111], r[111], s;
int main() {
  cin >> n;
  for (int i = 0; i < 3; i++) cin >> p[i];
  for (int i = 0; i < 2; i++) cin >> t[i];
  for (int i = 0; i < n; i++) cin >> l[i] >> r[i];
  for (int i = 0; i < n; i++) {
    s += (r[i] - l[i]) * p[0];
    if (i == n - 1) break;
    if (l[i + 1] - r[i] >= t[1] + t[0])
      s += t[0] * p[0] + t[1] * p[1] + (l[i + 1] - r[i] - t[0] - t[1]) * p[2];
    else if (l[i + 1] - r[i] >= t[0])
      s += t[0] * p[0] + (l[i + 1] - r[i] - t[0]) * p[1];
    else
      s += (l[i + 1] - r[i]) * p[0];
  }
  cout << s << endl;
  return 0;
}
