#include<bits/stdc++.h>
#define int long long
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int rand(int l, int r){
uniform_int_distribution<int> uid(l, r);
return uid(rng);
}
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tt=1;
//cout<<(1LL<<31LL)<<endl;
//cin>>tt;
//int T=
while(tt--)
{
int n,m;
cin>>n>>m;
int mx=0;
for(int i=0;i<n;i++){
int x;
cin>>x;
}
int l=rand(0,1);
if(l==0)
cout<<0<<"\n";
else cout<<max(0LL,m-n)<<"\n";
}}
/*stolen stuff you should look for
* int overflow, array bounds
* special cases (n=1?)
* do smth instead of nothing and stay organized
* WRITE STUFF DOWN
* DON'T GET STUCK ON ONE APPROACH
*/
Copy