#include <iostream>
#include <cstdio>
#include <cstdlib>
#define MAXN 200000000
#define Max 6002
using namespace std;
int S;
int N;
class BATCH
{
public:
int T;
int F;
}B[Max];
int TT[Max];
int TF[Max];
int F[Max];
void init()
{
cin>>N>>S;
for (int i=1;i<=N;i++)
cin>>B[i].T>>B[i].F;
for (int i=1;i<=N;i++)
F[i]=MAXN;
for (int i=N;i>=1;i--)
{
TT[i]=TT[i+1]+B[i].T;
TF[i]=TF[i+1]+B[i].F;
}
}
void Dynamic()
{
for (int i=N;i>=1;i--)
{
for (int j=i+1;j<=N+1;j++)
{
if (F[i]>(F[j]+(S+TT[i]-TT[j])*TF[i] ))
F[i]=F[j]+(S+TT[i]-TT[j])*TF[i];
}
}
}
int main()
{
freopen("batch.in","r",stdin);
freopen("batch.out","w",stdout);
init();
Dynamic();
cout<<F[1]<<endl;
return 0;
}