#include #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair P; int n,d; ll x[100005],v[100005]; int main(void){ scanf("%d%d",&n,&d); ll sum=0; for(int i=0;i