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