#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2, x, y, z;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2 >> z >> x;
  int res = (x - z) * p1;
  for (int i = 1; i < n; ++i) {
    cin >> y >> z;
    res += (z - y) * p1;
    int a = y - x;
    if (a <= t1)
      res += a * p1;
    else {
      res += t1 * p1;
      a -= t1;
      if (a <= t2)
        res += a * p2;
      else {
        res += t2 * p2;
        res += (a - t2) * p3;
      }
    }
    x = z;
  }
  cout << res << endl;
  return 0;
}
