#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 28;
int n, p1, t1, p2, t2, p3, l, r, j = INF, m, k, ans;
bool f[1441];
inline int max(int x, int y) { return x > y ? x : y; }
inline int min(int x, int y) { return x < y ? x : y; }
inline int read() {
  char c = getchar();
  int num = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') {
      f = -1;
    }
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    num = (num << 1) + (num << 3) + (c ^ 48);
    c = getchar();
  }
  return num * f;
}
int main() {
  n = read(), p1 = read(), p2 = read(), p3 = read(), t1 = read(),
  t2 = read() + t1;
  for (register int i = 1; i <= n; i++) {
    l = read(), r = read();
    j = min(j, l + 1);
    m = max(m, r);
    while (l < r) {
      f[++l] = true;
    }
  }
  while (j <= m) {
    if (f[j]) {
      k = 0;
    } else {
      k++;
    }
    if (k <= t1) {
      ans += p1;
    } else {
      if (k <= t2) {
        ans += p2;
      } else {
        ans += p3;
      }
    }
    j++;
  }
  printf("%d", ans);
  return 0;
}
