nd = list(map(int, input().split())) A = list(map(int, input().split())) print(nd[0] * nd[1] - sum(A))