shui
#include <iostream>
using namespace std;
int main()
{
int n,p1,p2,p3,t1,t2;
int data_time[110][2];
while(cin>>n>>p1>>p2>>p3>>t1>>t2)
{
for(int i = 1;i <= n;i ++)
cin>>data_time[i][0]>>data_time[i][1];
int ans = 0;
ans += p1*(data_time[1][1]-data_time[1][0]);
for(int i = 2;i <= n;i ++)
{
int w = data_time[i][0] - data_time[i-1][1];
if(w <= t1)
ans += p1*w;
if(w > t1 && w <= t1 + t2)
ans = ans + (w-t1)*p2 + t1*p1;
if(w > t1 + t2)
ans = ans + t1*p1 + t2*p2 + (w-t1-t2)*p3;
ans += (data_time[i][1]-data_time[i][0])*p1;
}
cout<<ans<<endl;
}
return 0;
}