#include using namespace std; int main() { int N,K; cin>>N>>K; if(K==0||K>N)cout<<0<