#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int i, j, result = 0, prev_j = 0;
  while (n--) {
    cin >> i >> j;
    result += (j - i) * p1;
    if (prev_j) {
      int pause = i - prev_j;
      if (pause >= t1) {
        result += t1 * p1;
        pause -= t1;
        if (pause >= t2) {
          result += t2 * p2;
          pause -= t2;
          if (pause > 0) result += pause * p3;
        } else {
          result += pause * p2;
        }
      } else {
        result += pause * p1;
      }
    }
    prev_j = j;
  }
  cout << result << '\n';
}
