/* -*- coding: utf-8 -*- * * 1389.cc: No.1389 Clumsy Calculation - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 200000; /* typedef */ typedef long long ll; /* global variables */ int ss[MAX_N]; /* subroutines */ /* main */ int main() { int n, x; scanf("%d%d", &n, &x); ll ssum = 0; for (int i = 0; i < n; i++) scanf("%d", ss + i), ssum += ss[i]; ll ai = (ll)n * x - ssum; printf("%lld\n", x - ai); return 0; }