#include using namespace std; int main(){ int a,b,c; cin >> a >> b; if(b==0||a=b) c=2; else c=1; } else c=2; cout << a-c << endl; return 0; }