stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.136209441248877x):
#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;

}
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 5.216231667619503x):
#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;

}
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 5.216297296666628x):
#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;

}
// Slower C++ solution:
//============================================================================

// 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;

}

// Faster C++ solution for the same problem (measured speedup: 5.2173400693042735x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.377105956310759x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.33405994874979x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.316612244958733x):
#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;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



#define int long long

int n, a, b;

int x[101010];



int dp[101010];

int dfs(int i=1, int c=0)

{

        if (i == n){

                return 0;

        }



        int &ret = dp[i];

        if (ret != -1) return ret;

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

        return ret;

}

main()

{

        cin >> n >> a >> b;



        memset(dp, -1, sizeof(dp));

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

                cin >> x[i];

        }



        /*

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

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

        }

        */



        cout << dfs() << endl;

}




// Faster C++ solution for the same problem (measured speedup: 1.7594831304189122x):
#include <bits/stdc++.h>

using namespace std;



// clang-format off

#define range(i, l, r) for (int i = (int)l; i < (int)(r); ++(i))

#define rrange(i, l, r) for (int i = ((int)(r) - 1); i >= (int)l; --(i))



#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)

#define rwhole(f,x,...) ([&](decltype((x)) whole) { return (f)(rbegin(whole), rend(whole), ## __VA_ARGS__); })(x)



#define debug(x) cerr << "(" << __LINE__ << ")" << #x << ": " << (x) << endl



inline void br(ostream &os = cerr) { os << endl; }



using int32 = int;

using int64 = long long;



const int mod     = 1e9 + 7;

const int32 inf   = 1001001001;

const int64 infll = 1001001001001001001ll;



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

const string YES = "YES", NO = "NO", Yes = "Yes", No = "No", yes = "yes", no = "no";



struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup;



template <typename T = int64> T input() { T x; cin >> x; return x; }



template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { range(i, 0, v.size()) { os << v[i] << (i + 1 != v.size() ? " " : ""); } return os; } 

template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }

template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; }

template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; }



template <typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); }

template <typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v(ts...))>(a, make_v(ts...)); }



template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

// clang-format on



void solver() {

  int64 N = input(), A = input(), B = input();



  vector<int64> X(N);

  cin >> X;



  int64 ans = 0;

  range(i, 1, N) {

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

  }



  cout << ans << endl;

}



signed main(int argc, char *argv[]) {

  solver();

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.302799356210431x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.259928553611517x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.301522467305705x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.2170888008215295x):
#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; 

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.174910930399356x):
#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; 

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.2158325506115455x):
#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; 

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.145900315085082x):
#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; 

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.215899745390219x):
#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; 

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cmath>



using namespace std;



const int MAXN=100010;

long long X[MAXN];

long long f[MAXN];



long long A,B,N;



long long min(long long a,long long b)

{

	return a<b?a:b;

}



int main()

{

	

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

	f[1]=0;

	

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

	scanf("%ld",&X[i]);

	

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

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

		

	printf("%ld",f[N]);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.159621196739008x):
#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; 

}
// Slower C++ solution:
#include<iostream>

#include <bits/stdc++.h>

using namespace std;

typedef vector<int> VI;

typedef long long ll;



int main(){

  ll N, A, B;

  cin>>N>>A>>B;

  vector<ll> X;

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

    ll k;

    cin>>k;

    X.push_back(k);

  }

  ll cnt = 0;



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



    ll n = abs(X[i] - X[i+1]);

    ll p = n * A;

    if(p <= B){

      cnt += p;

    }else{

      cnt += B;

    }

  }

  cout<<cnt;

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.269671636645695x):
#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; 

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <vector>

using namespace std;



int main() {

  long long counter = 0;

  long long n, a, b;

  cin >> n >> a >> b;



  vector<int> towns(n);



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

    cin >> towns[i];

  }



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

    long long distance = (towns[i] - towns[i - 1]) * a;

    counter += min(distance, b);

  }



  cout << counter;

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.278490220968569x):
#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; 

}
// Slower C++ solution:
/*g++ file.cpp -o file.out*/

/*./file.out*/



#include <cmath>

#include <queue>

#include <stack>

#include <cstdio>

#include <string>

#include <vector>

#include <cstring>

#include <iostream>

#include <algorithm>

using namespace std;



#define LL long long

#define Mod 1000000007

#define L_Mod 17100000013



LL sov[100005],tmp[100005];

int main()

{

    int n,A,B;

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

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

    {

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

    }

    tmp[0]=0;

    sov[1]=0;

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

    {

        sov[i]=min(sov[i-1]+(tmp[i]-tmp[i-1])*A,sov[i-1]+B);

    }

    printf("%lld\n",sov[n]);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.203997505028653x):
#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; 

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;



int main(){

    ll n,cnt=0,x,a,b,s;

	cin>>n>>a>>b>>s;

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

	{

		cin>>x;

		cnt+=min((x-s)*a,b);

		s=x;

	}

	cout<<cnt<<endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.222124026953871x):
#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; 

}
// Slower C++ solution:
#include <iostream>



long long x[100005];

int main(){

    long long n,a,b;

    std::cin >> n >> a >> b;

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

        std::cin >> x[i];

    }

    long long res = 0;

    for(int i = 2; i <= n; i ++) res += (x[i] - x[i - 1] )* a > b ? b : a * (x[i] - x[i - 1]);

    std::cout << res;

}

// Faster C++ solution for the same problem (measured speedup: 5.2170888008215295x):
#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; 

}