#include <bits/stdc++.h>
#define rep(i, a, b) for (register ll i = (a); i <= (b); ++i)
using namespace std;
typedef long long ll;
const ll MAXN = 1e6 + 5;
ll n, L, M;
ll a[MAXN];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> L >> M;
ll ma = 0;
rep(i, 1, n) {
cin >> a[i];
ma = max(ma, a[i]);
}
if (ma >= M) {
ll ans = 0;
rep(i, 1, n) { ans += max(0ll, M - a[i]); }
rep(i, 1, n) { ans += (a[i] < M); }
cout << ans << "\n";
return 0;
}
ll ans = M - ma - 1;
rep(i, 1, n) { ans += 1 + M - a[i]; }
cout << ans << "\n";
return 0;
}