#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); long long A,B; cin>>A>>B; if(A==1){ cout<<"0\n"; }else{ cout<