#include using namespace std; int main(){ int N, X; cin >> N >> X; vector S(N); for (int i = 0; i < N; i++){ cin >> S[i]; } long long a = (long long) X * (N - 1); long long b = 0; for (int i = 0; i < N; i++){ b += S[i]; } cout << b - a << endl; }