#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> a[110];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  long long int i, ans = 0;
  for (i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  ans = (a[0].second - a[0].first) * p1;
  for (i = 1; i < n; i++) {
    if ((a[i].first - a[i - 1].second) <= t1) {
      ans += (a[i].first - a[i - 1].second) * p1;
    } else if ((a[i].first - a[i - 1].second) <= t1 + t2) {
      ans += t1 * p1 + (((a[i].first - a[i - 1].second) - (t1)) * p2);
    } else {
      ans += t1 * p1 + t2 * p2 +
             (((a[i].first - a[i - 1].second) - (t1 + t2)) * p3);
    }
    ans += (a[i].second - a[i].first) * p1;
  }
  cout << ans << endl;
  return 0;
}
