/** * author: tomo0608 * created: 13.02.2021 00:03:45 **/ #pragma GCC optimize("Ofast") #include using namespace std; typedef long long ll; typedef long double ld; template using V = vector; template using VV = V>; typedef pair pii; typedef pair pll; #define all(x) x.begin(),x.end() #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define drep2(i, m, n) for (int i = (m)-1; i >= (n); --i) #define drep(i, n) drep2(i, n, 0) #define unique(a) a.erase(unique(a.begin(),a.end()),a.end()) template using priority_queue_rev = priority_queue, greater >; template inline bool chmax(T &a, const U &b) { if (a inline bool chmin(T &a, const U &b) { if (a>b) { a=b; return 1; } return 0; } template istream &operator>>(istream &is, pair &p) { is >> p.first >> p.second; return is; } template ostream &operator<<(ostream &os, const pair &p) { os << '(' << p.first << ", " << p.second << ')'; return os; } template istream &operator>>(istream &is, vector &v) { for (auto &e : v) is >> e; return is; } template ostream &operator<<(ostream &os, const vector &v) { for (auto &e : v) os << e << ' '; return os; } template ostream& operator << (ostream& os, set& set_var) {os << "{"; for (auto itr = set_var.begin(); itr != set_var.end(); itr++) {os << *itr;++itr;if(itr != set_var.end()) os << ", ";itr--;}os << "}";return os;} template ostream &operator<<(ostream &os, map &map_var) {os << "{";for(auto itr = map_var.begin(); itr != map_var.end(); itr++) {os << *itr;itr++;if (itr != map_var.end()) os << ", ";itr--;}os << "}";return os;} template inline int count_between(vector &a, T l, T r) { return lower_bound(all(a), r) - lower_bound(all(a), l); } // [l, r) #define pb push_back #define eb emplace_back #define elif else if #define mp make_pair #define bit(n, k) ((n >> k) & 1) /*nのk bit目*/ template T gcd(T x, T y){if(x%y == 0)return y;return gcd(y, x%y);} template T gcd(vector a){T res = a[0];for(auto &x: a)res = gcd(res, x);return res;} template T mypow(T x, ll n){T ret = 1;while(n > 0){if(n & 1)(ret *= x);(x *= x);n >>= 1;}return ret;} #define endl '\n' int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1}; int dy[8] = {0, 1, 0, -1, 1, -1, -1, 1}; // Primality test class Prime { public: const int N; vector min_prime; vector primes; Prime(int size): N(size), min_prime(N+1){ rep(i,N+1)min_prime[i] = i; min_prime[0] = -1; min_prime[1] = -1; for(int i = 2;i<=N;i++){ if(min_prime[i]!=i)continue; primes.push_back(i); int tmp = 2*i; while(tmp <= N){ if(min_prime[tmp]==tmp)min_prime[tmp] = i; tmp += i; } } } bool check(int x){ return min_prime[x] == x;} }; void solve(){ ll n,x;cin >> n >> x; ll ans = -(n-1)*x, tmp = 0; rep(i,n){ cin >> tmp; ans +=tmp; } cout << ans << endl; } int main() { cin.tie(0); ios_base::sync_with_stdio(false); cout << setprecision(20); int codeforces = 1; //cin >> codeforces; while(codeforces--){ solve(); } return 0; }