/** * @FileName a.cpp * @Author kanpurin * @Created 2021.02.12 21:22:00 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { ll n,x;cin >> n >> x; ll total = 0; for (int i = 0; i < n; i++) { int s;cin >> s; total += s; } total -= (n-1)*x; cout << total << endl; return 0; }