stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

#include<cstring>

#include<string>

#include<algorithm> 

using namespace std;

long long ans=0;

int main()

{

	long long n,a,b,x,y;

	cin>>n>>a>>b;

	cin>>y;

	for(long long i=2;i<=n;i++)

	{

		cin>>x;

		if((x-y)*a>=b) ans+=b;

		else ans+=((x-y)*a);

		y=x;

	}

	cout<<ans;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    long long int N,A,B,a[100005],i,sum=0;

    scanf("%lld%lld%lld",&N,&A,&B);

    for(i=0;i<N;i++)

        scanf("%lld",&a[i]);

    for(i=0;i<N-1;i++)

       {

        if((a[i+1]-a[i])*A<B)

        sum+=(a[i+1]-a[i])*A;

        else

            sum+=B;

       }

       printf("%lld",sum);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<cmath>

#include<cstring>

#include<cstdlib>

#include<ctime>

#include<cstdio>

#include<string>

//#include<string>

//#include<sstream>

#include<iomanip>

using namespace std;

int main() {

	long long  n,a,b;

	long long x[100000],i;

	scanf("%lld%lld%lld",&n,&a,&b);

	for(i=0;i<n;i++){

		scanf("%lld",&x[i]);

	}

	long long sum=0;

	for(i=1;i<n;i++){

		sum+=min((x[i]-x[i-1])*a,b);

	}

	printf("%lld\n",sum);

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    long long int N,A,B,a[100005],i,sum=0;

    scanf("%lld%lld%lld",&N,&A,&B);

    for(i=0;i<N;i++)

        scanf("%lld",&a[i]);

    for(i=0;i<N-1;i++)

       {

        if((a[i+1]-a[i])*A<B)

        sum+=(a[i+1]-a[i])*A;

        else

            sum+=B;

       }

       printf("%lld",sum);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<math.h>

using namespace std;

long long a[100005];

int main()

{

	long long n,a1,b,minsum=0;

	cin>>n>>a1>>b;

	for(int i=1;i<=n;i++)

	cin>>a[i];

	sort(a+1,a+n+1);

	for(int i=1;i<n;i++)

	minsum+=min(a1*(a[i+1]-a[i]),b);

	cout<<minsum<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream> 

using namespace std;

int main()

{

	long long n,a,b,x,y,tir=0;;

	cin>>n>>a>>b>>x;

	n--;

	while(n--){

		cin>>y;

		if((y-x)*a>b)tir+=b;

		else tir+=(y-x)*a;

		x=y;

	}cout<<tir;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdio>

#include <cmath>

#include <cstring>

#include <algorithm>

#include <vector>

#include <map>

#include <cstdlib>

#include <set>

#include <queue>

using namespace std;



#define X first

#define Y second

#define N 100010

typedef long long ll;

typedef pair<int,int> pii;

const int Mod=1000000007;



const double INF=1e18;

typedef long long ll;

int x[N];





int main()

{

	//freopen("in.in","r",stdin);

	//freopen("out.out","w",stdout);

	

	int n,a,b; scanf("%d%d%d",&n,&a,&b);

	for (int i=1;i<=n;i++) scanf("%d",&x[i]);

	

	ll ans=0;

	for (int i=2;i<=n;i++)

	{

		ans+=min(1ll*(x[i]-x[i-1])*a,1ll*b);

	}

	cout<<ans<<endl;

	

	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



typedef long long LL;

int N,A,B,X[100010];



int main()

{

	scanf("%d%d%d",&N,&A,&B);

	for (int i=1;i<=N;i++)scanf("%d",&X[i]);

	LL ans=0;

	for (int i=2;i<=N;i++)

	ans+=min(LL(A)*LL(X[i]-X[i-1]),LL(B));

	cout<<ans<<endl;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<set>

#include<map>

#include<stack>

#include<queue>

#include<deque>

#include<cmath>

#include<cstdio>

#include<cctype>

#include<string>

#include<vector>

#include<cstdlib>

#include<cstring>

#include<sstream>

#include<iostream>

#include<algorithm>

#define MAXN 100000

#define hlq 1000000007

#define pii pair<int,int>



using namespace std;

int d[MAXN+80];

long long ans,a,b;

int main()

{

	int n,i;

	scanf("%d",&n);

	cin>>a>>b;

	for(i=1;i<=n;i++)

		scanf("%d",d+i);

	for(i=1;i<n;i++)

		ans+=min(a*(d[i+1]-d[i]),b);

	cout<<ans;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



typedef long long LL;



const int N = 1e5 + 10;

int x[N];



int main() {

    int n, a, b;

    scanf("%d%d%d", &n, &a, &b);

    for (int i = 0; i < n; i++) scanf("%d", x + i);

    LL ans = 0;

    for (int i = 1; i < n; i++) {

        ans += min(1ll * (x[i] - x[i-1]) * a, (LL)b);

    }

    printf("%lld\n", ans);

    return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

using namespace std;

#define LL long long



const LL MOD = 1e9 + 7;

const int N = 200005;



LL n, A, B, in[N];



int main()

{

    while(cin >> n >> A >> B){

        for(int i=0;i<n;i++) cin >> in[i];

        sort(in, in + n);

        LL mn = 0;

        for(int i=1;i<n;i++){

            LL dis = in[i] - in[i - 1];

            LL x = dis * A;

            if(x < B) mn += x;

            else mn += B;

        }

        cout << mn << '\n';

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
// In the name of Allah the Most Merciful.



#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



int main(void)

{

    ll n , a , b;

    cin >> n >> a >> b;



    ll ar[n];



    for(int i=0;i<n;i++)cin >> ar[i];



    ll ans = 0;



    for(int i=0;i<n-1;i++){



        ll temp = ar[i+1] - ar[i];

        ans+=min(temp*a , b);

    }



    cout << ans << endl;



    return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



#define debug(x) cout << #x << " = " << x << endl

#define fori(i, ini, lim) for(int i = int(ini); i < int(lim); i++)

#define ford(i, ini, lim) for(int i = int(ini); i >= int(lim); i--)



using namespace std;



typedef long long ll;

typedef long double ld;

typedef pair<int, int> ii;



const int MAX = 1e5 + 5;

ll arr[MAX];

ll n, a, b;



int main() {

	scanf("%lld %lld %lld", &n, &a, &b);

	fori(i, 1, n + 1) {

		scanf("%lld", arr + i);

	}



	ll ans = 0;

	fori(i, 2, n + 1) {

		ans += min((arr[i] - arr[i - 1]) * a, b);

	}



	printf("%lld\n", ans);



	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

  long long int n,a,b,i,tem,v,sum=0;

  cin>>n>>a>>b;

  for(i=1;i<=n;i++)

  {

    if(i>1)tem=v;

    cin>>v;

    if(i>1)

    {

      if(abs(v-tem)*a>b)

      sum+=b;

    else sum+=abs(v-tem)*a;

    tem=v;

    }

  }

  cout<<sum<<endl;

  return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

using namespace std;

long long n,a,b;

long long x[100010];

void read(long long &x)

{

	char ch;

	ch=getchar();

	while(ch<'0'||ch>'9') ch=getchar();

	while(ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}

}

int main()

{

	read(n);read(a);read(b);

	long long ans=0;

	read(x[1]);

	for(int i=2;i<=n;i++)

	{

		read(x[i]);

		if((x[i]-x[i-1])*a>b) ans+=b;

		else ans+=(x[i]-x[i-1])*a;

	}

	printf("%lld",ans);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <cstring>

#include <string>

#include <cmath>

#define ll long long

using namespace std;

ll a[100005];

int main(){

	ll n,A,B;

	cin>>n>>A>>B;

	for(ll i=0;i<n;i++){

		cin>>a[i];

	}

	ll sum=0;

	for(ll i=1;i<n;i++){

		ll ans1=(a[i]-a[i-1])*A;

		ll ans2=B;

		if(ans1<ans2)

			sum+=ans1;

		else

			sum+=ans2;

	}

	cout<<sum<<endl;

	return 0;

} 

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <string>

#include <cmath>

using namespace std;

long long t[100005];

int main()

{

	long long n,a,b;

	cin>>n>>a>>b;

	long long x=0;

	for(int i=0;i<n;i++)

	{

		cin>>t[i];

	}

	for(int i=0;i<n-1;i++)

	{

		if((t[i+1]-t[i])*a>=b)

		{

			x+=b;

		}

		else

		{

			x=x+(t[i+1]-t[i])*a;

		}

	}

	cout<<x<<endl;

	return 0;

} 

// Optimized solution to the same problem (faster):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
//============================================================================

// Name        : hoba.cpp :)

// Author      : (O_O Diab) (Why_not) (el 3AQ)

// Version     :

// Copyright   : please, Don't touch me :(

// Description : problem in C++

// MAIN IDEA   :

//============================================================================

#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

#define ll long long

#define rw freopen("input.txt","r",stdin),freopen("output.txt","w",stdout);

#define pb push_back

#define F first

#define S second

#define pf push_front

#define lp(i,a,b) for (int i=a;i<=(int)b;++i)

#define lp2(i,a,b) for (int i=a;i>=b;--i)

#define f(x) return cout<<x<<"\n",0

#define pii pair<int,int>

#define pll pair<ll,ll>

#define all(c) c.begin(),c.end()

#define allr(c) c.rbegin(),c.rend()

#define p(x) cout<<#x<<" = { "<<x<<" } \n"

#define vi vector<int>

#define vl vector<ll>

#define vii vector<pii>

#define vll vector<pll>

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

#define EPS 1e-6

// to convert string to number use int a = stoi(string);

// to convert number to string use string s = to_string(int);

#define FAST ios::sync_with_stdio(0),ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);

#define clr(c,x) memset(c,x,sizeof(c));

using namespace __gnu_pbds;

using namespace std;

const ll INFL = 0x3f3f3f3f3f3f3f3fLL;

const int dx[] = { 0, 1, 0, -1, 1, -1, 1, -1 };

const int dy[] = { 1, 0, -1, 0, 1, -1, -1, 1 };

const int N = 1e5 + 5, mod = (int) 1e9 + 7, INF = 0x3f3f3f3f;

int main() {

#ifdef ONLINE_JUDGE

	FAST

#endif

	ll n, a, b, prv, ans = 0, x;

	cin >> n >> a >> b >> prv;

	lp(i,2,n)

	{

		cin >> x;

		ans += min((x - prv) * a, b);

		prv = x;

	}

	f(ans);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

#include <algorithm>

using namespace std;

typedef long long ll;

#define rep(i,n) for(int i=0;i<(n);++i)

int main(){

	ll n,a,b,ans=0;cin>>n>>a>>b;

	vector<ll> x(n);

	rep(i,n)cin>>x[i];

	rep(i,n-1)ans+=min(a*(x[i+1]-x[i]),b);

	cout<<ans<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

using namespace std;

#define FOR(i,a,n) for(int i=a;i<(n);++i)

inline void read(int &x){

	x=0;char ch=getchar();

	while(ch<'0')ch=getchar();

	while(ch>='0'){

		x=x*10+ch-48;

		ch=getchar();

	}

}

const int N=1e5;

int x[N];

int main(){

	int n,a,b;read(n);read(a);read(b);

	long ans=0;

	read(x[0]);

	FOR(i,1,n){

		read(x[i]);

		ans+=((long)a*(x[i]-x[i-1])>b)?b:(long)a*(x[i]-x[i-1]);

	}

	printf("%ld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

using namespace std;

typedef long long ll;

#define rep(i,n) for(int i=0;i<(n);++i)

int main(){

	ll n,a,b,ans=0;scanf("%lld %lld %lld",&n,&a,&b);

	vector<ll> x(n);

	rep(i,n)scanf("%lld",&x[i]);

	rep(i,n-1)ans+=((a*(x[i+1]-x[i])<b)?a*(x[i+1]-x[i]):b);

	cout<<ans<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

using namespace std;

#define FOR(i,a,n) for(int i=a;i<(n);++i)

inline void read(int &x){

	x=0;char ch=getchar();

	while(ch<'0')ch=getchar();

	while(ch>='0'){

		x=x*10+ch-48;

		ch=getchar();

	}

}

const int N=1e5;

int x[N];

int main(){

	int n,a,b;read(n);read(a);read(b);

	long ans=0;

	read(x[0]);

	FOR(i,1,n){

		read(x[i]);

		ans+=((long)a*(x[i]-x[i-1])>b)?b:(long)a*(x[i]-x[i-1]);

	}

	printf("%ld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <vector>

using namespace std;

#define FOR(i,a,n) for(int i=a;i<(n);++i)

int main(){

	int n;long a,b;scanf("%d %ld %ld",&n,&a,&b);

	vector<int> x(n);long ans=0;

	scanf("%d",&x[0]);

	FOR(i,1,n){

		scanf("%d",&x[i]);

		long diff=x[i]-x[i-1];

		ans+=((a*diff>b)?b:a*diff);

	}

	printf("%ld\n",ans);

    return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

using namespace std;

#define FOR(i,a,n) for(int i=a;i<(n);++i)

inline void read(int &x){

	x=0;char ch=getchar();

	while(ch<'0')ch=getchar();

	while(ch>='0'){

		x=x*10+ch-48;

		ch=getchar();

	}

}

const int N=1e5;

int x[N];

int main(){

	int n,a,b;read(n);read(a);read(b);

	long ans=0;

	read(x[0]);

	FOR(i,1,n){

		read(x[i]);

		ans+=((long)a*(x[i]-x[i-1])>b)?b:(long)a*(x[i]-x[i-1]);

	}

	printf("%ld\n",ans);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

const int N=100001;

long long x[N];

int main()

{

    long long ans=0;

    long long n,A,B;

    cin>>n>>A>>B;

    for(register int i=1;i<=n;++i)

        cin>>x[i];

    for(register int i=2;i<=n;++i)

        if((x[i]-x[i-1])*A>B)

            ans+=B;

        else

            ans+=(long long)(x[i]-x[i-1])*A;

    return cout<<ans,0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cctype>

#include <algorithm>

using namespace std;



inline long long read(){

	long long x=0,f=1;

	char ch=getchar();

	while(!isdigit(ch))	ch=getchar();

	while(isdigit(ch))x=x*10+ch-'0',ch=getchar();

	ungetc(ch,stdin);

	return x;

}



int main(){

	long long n=read(),a=read(),b=read();

	long long cost=0,op=0,np=read();

	for(int i=1;i<n;i++){

		op=np;

		np=read();

		cost+=min(a*(np-op),b);

	}

	printf("%lld\n",cost);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long n,x[100005],a,b,ans=0;

int main(){

	cin>>n>>a>>b;

	for(int i=1;i<=n;i++){

		cin>>x[i];

	}

	for(int i=1;i<=n-1;i++){

		ans+=min((x[i+1]-x[i])*a,b);

	}

	cout<<ans;

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cctype>

#include <algorithm>

using namespace std;



inline long long read(){

	long long x=0,f=1;

	char ch=getchar();

	while(!isdigit(ch))	ch=getchar();

	while(isdigit(ch))x=x*10+ch-'0',ch=getchar();

	ungetc(ch,stdin);

	return x;

}



int main(){

	long long n=read(),a=read(),b=read();

	long long cost=0,op=0,np=read();

	for(int i=1;i<n;i++){

		op=np;

		np=read();

		cost+=min(a*(np-op),b);

	}

	printf("%lld\n",cost);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long x[100001];

long long y[100001];

int main()

{

	long long n,a,b,s=0;

	cin>>n>>a>>b;

	for(int i=1;i<=n;i++)

		cin>>x[i];

	for(int i=1;i<=n-1;i++)

		y[i]=x[i+1]-x[i];

	for(int i=1;i<=n-1;i++)

	{

		if(b<=y[i]*a)

			s+=b;

		else

			s+=y[i]*a;

	}

	cout<<s;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cctype>

#include <algorithm>

using namespace std;



inline long long read(){

	long long x=0,f=1;

	char ch=getchar();

	while(!isdigit(ch))	ch=getchar();

	while(isdigit(ch))x=x*10+ch-'0',ch=getchar();

	ungetc(ch,stdin);

	return x;

}



int main(){

	long long n=read(),a=read(),b=read();

	long long cost=0,op=0,np=read();

	for(int i=1;i<n;i++){

		op=np;

		np=read();

		cost+=min(a*(np-op),b);

	}

	printf("%lld\n",cost);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define ll long long

#define get ch=getchar()

#define is isdigit(ch)

using namespace std;

const int maxm=100001;

inline ll read(){

	char get;

	ll r=0;

	while(!is)get;

	while(is){

		r=(r<<3)+(r<<1)+(ch^48);

		get;

	}

	return r;

}

ll n,a,b,pos[maxm],dis[maxm-1],costs;

int main(){

	n=read();a=read();b=read();

	for(ll i=1;i<=n;i++){

		pos[i]=read();

		if(i>1){

			dis[i-1]=pos[i]-pos[i-1];

			dis[i-1]*=a;

		}

	}

	for(ll i=1;i<=n-1;i++){

		if(dis[i]<b)costs+=dis[i];

		else costs+=b;

	}

	printf("%lld",costs);

	return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <algorithm>



using namespace std;



int x[100005], n;

long long ans = 0, a, b;



int main() {

    scanf("%d %lld %lld", &n, &a, &b);

    for(int i=0; i<n; i++) {

        scanf("%d", &x[i]);

    }

    for(int i=1; i<n; i++) {

        long long s = x[i-1], e = x[i];

        ans += min((e-s) * a, b);

    }

    printf("%lld\n", ans);

//    system("pause");

    return 0; 

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long x[1000010],ju[100010];

int main()

{

	long long n,a,b;

	long long ans=0;

	cin>>n>>a>>b;

	x[0]=0;

	for(int i=1;i<=n;i++)

	{

	   cin>>x[i];

	   ju[i]=x[i]-x[i-1];

	}

	for(int i=2;i<=n;i++)

	{

		if(ju[i]*a<=b)

		{

			ans+=ju[i]*a;

		}

		if(ju[i]*a>b)

		{

			ans+=b;

		}

	}

	cout<<ans;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <algorithm>



using namespace std;



int x[100005], n;

long long ans = 0, a, b;



int main() {

    scanf("%d %lld %lld", &n, &a, &b);

    for(int i=0; i<n; i++) {

        scanf("%d", &x[i]);

    }

    for(int i=1; i<n; i++) {

        long long s = x[i-1], e = x[i];

        ans += min((e-s) * a, b);

    }

    printf("%lld\n", ans);

//    system("pause");

    return 0; 

}


// Fastest known solution for this problem: