#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[105];
int main(void) {
  int n, p1, p2, p3, t1, t2;
  int ans = 0, time;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i].first >> arr[i].second;
    ans += (arr[i].second - arr[i].first) * p1;
  }
  for (int i = 1; i < n; i++) {
    time = arr[i + 1].first - arr[i].second;
    if (time <= t1)
      ans += time * p1;
    else if (time <= t1 + t2) {
      ans += t1 * p1;
      ans += (time - t1) * p2;
    } else {
      ans += t1 * p1;
      ans += t2 * p2;
      ans += (time - t1 - t2) * p3;
    }
  }
  cout << ans;
  return 0;
}
