import sys from typing import List, Tuple def int1(x: str, /): return int(x) - 1 def input(): return sys.stdin.readline().rstrip('\n') def main(): n, x = map(int, input().split()) *s, = map(int, input().split()) return sum(s) - x * (n - 1) def _start(): ret = main() if ret is not None: if isinstance(ret, List) or isinstance(ret, Tuple): print(*ret) else: print(ret) if __name__ == '__main__': _start()