#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, P1, P2, P3, T1, T2;
  cin >> N >> P1 >> P2 >> P3 >> T1 >> T2;
  vector<int> starts(N);
  vector<int> ends(N);
  for (int i = 0; i < N; i++) {
    cin >> starts[i] >> ends[i];
  }
  int total_power = 0;
  for (int i = 0; i < N; i++) {
    total_power += P1 * (ends[i] - starts[i]);
    if (i == N - 1) {
      break;
    }
    int period = starts[i + 1] - ends[i];
    if (period <= T1) {
      total_power += period * P1;
    } else {
      total_power += T1 * P1;
      period -= T1;
      if (period <= T2) {
        total_power += period * P2;
      } else {
        total_power += T2 * P2 + P3 * (period - T2);
      }
    }
  }
  cout << total_power << endl;
  return 0;
}
