#include <bits/stdc++.h>
using namespace std;
const double EXP = 1e-9;
const int INF = 0x3f3f3f3f;
const long long MINF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const int N = 1e6 + 5;
struct node {
  int l;
  int r;
} a[105];
int main() {
  std::ios::sync_with_stdio(false);
  int n, p1, p2, p3, t1, t2;
  while (cin >> n >> p1 >> p2 >> p3 >> t1 >> t2) {
    for (int i = 0; i < n; i++) cin >> a[i].l >> a[i].r;
    int ans = 0;
    for (int i = 0; i < n; i++) {
      ans += (a[i].r - a[i].l) * p1;
      if (i != n - 1) {
        int tmp = a[i + 1].l - a[i].r;
        if (tmp > t1) {
          tmp -= t1;
          ans += t1 * p1;
          if (tmp > t2) {
            tmp -= t2;
            ans += t2 * p2;
            if (tmp > 0)
              ans += tmp * p3;
            else
              ;
          } else
            ans += tmp * p2;
        } else {
          ans += tmp * p1;
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
