#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000,100000000")
using namespace std;
const long long inf = 1e18 + 7;
const long long mod = 1e9 + 7;
const double eps = 1e-10;
const double PI = 2 * acos(0.0);
const double E = 2.71828;
int main(void) {
  long long n, p1, p2, p3, t1, t2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  t2 += t1;
  long long time = 0;
  long long last = 0;
  for (long long(i) = 0; (i) < (long long)(n); (i)++) {
    long long l, r;
    cin >> l >> r;
    time += (r - l) * p1;
    if (i) {
      long long now = (l - last);
      if (now < t1)
        time += now * p1;
      else if (now >= t1 && now < t2)
        time += t1 * p1 + (now - t1) * p2;
      else
        time += t1 * p1 + (t2 - t1) * p2 + (now - t2) * p3;
    }
    last = r;
  }
  cout << time << endl;
  return 0;
}
