#include using namespace std; int main() { int n, k; cin >> n >> k; cout << k - 1 << endl; return 0; }