#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, p1, p2, p3, t1, t2, l, r, ans = 0, temp = 0, a;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  for (long long int i = 0; i < n; i++) {
    cin >> l >> r;
    ans += ((r - l) * p1);
    if (temp) {
      a = l - temp;
      if (a >= t1) {
        ans += (t1 * p1);
        a -= t1;
        if (a >= t2) {
          ans += (t2 * p2);
          a -= t2;
        } else {
          ans += (a * p2);
          a = 0;
        }
        ans += (a * p3);
      } else
        ans += (a * p1);
    }
    temp = r;
  }
  cout << ans << "\n";
}
