#include <bits/stdc++.h>
using namespace std;
#define Fio ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
int A[100100],inv[100100];
int qpow(int a,int b,int p)//a^b%p a*a*a....*a
{
if(b==0) return 1;
if(b==1) return a%p;
int res=qpow(a,b/2,p); //a^6 a^3*a^3
if(b%2==1) return res*res%p*a%p;
else return res*res%p;
}
int C(int x,int k){
return A[x]*inv[k]%p*inv[x-k]%p;
}
int main() {
for(int i=1;i<=100000;i++)
A[i]=A[i-1]*i%p;
inv[100000]=qpow(A[100000],p-2,p);
for(int i=100000;i>1;i--)
inv[i-1]=inv[i]*i%p;
cout<<C(n,m);
return 0;
}