#include // #include using namespace std; // using namespace atcoder; using ll = long long; using ull = unsigned long long; using P = pair; #define rep(i,n) for(ll i = 0;i < (ll)n;i++) #define ALL(x) (x).begin(),(x).end() #define MOD 1000000007 int main(){ ll n,x; cin >> n >> x; ll k = 0; rep(i,n){ ll a;cin >> a; k += a; } cout << -(n-1)*x + k << "\n"; return 0; }